From e262a51bee21d3236378eae6e7c6573443e26869 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 21 Jan 2013 16:20:53 -0800 Subject: [PATCH] Specify postgresql version on Jenkins slaves. The fact built into the postgresql module cannot determine which version of postgresql to use in all cases (eg on Oneiric hosts). To get around this hardcode the version to '9.1' when a default is not found by the upstream module. Change-Id: If5e4e0d7325d1507353d907cab4539260c7d4bc0 Reviewed-on: https://review.openstack.org/20196 Reviewed-by: James E. Blair Reviewed-by: Jeremy Stanley Approved: Clark Boylan Tested-by: Jenkins --- modules/jenkins/manifests/slave.pp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp index 6c8b350473..b5d96f6fb5 100644 --- a/modules/jenkins/manifests/slave.pp +++ b/modules/jenkins/manifests/slave.pp @@ -175,14 +175,31 @@ class jenkins::slave( ], } + $no_postgresql_version = 'Unsupported OS! Please check `postgres_default_version` fact.' + if $::postgres_default_version == $no_postgresql_version { + # Have a default postgres version if the postgresql module can't decide + # on a sane default for itself. + $postgresql_version = '9.1' + } + else { + $postgresql_version = $::postgres_default_version + } + class { 'postgresql::params': + version => $postgresql_version, + } + class { 'postgresql::server': config_hash => { 'postgres_password' => 'insecure_slave', 'manage_redhat_firewall' => false, 'listen_addresses' => '127.0.0.1', }, + require => Class['postgresql::params'], + } + + class { 'postgresql::devel': + require => Class['postgresql::params'], } - include postgresql::devel postgresql::db { 'openstack_citest': user => 'openstack_citest',