Merge "Upgrade puppetlabs-postgresql to fix concat module"

This commit is contained in:
Jenkins 2013-11-11 05:48:07 +00:00 committed by Gerrit Code Review
commit 8fcf1145c8
2 changed files with 12 additions and 29 deletions

View File

@ -29,7 +29,7 @@ MODULES["puppetlabs-apache"]="0.0.4"
MODULES["puppetlabs-apt"]="1.1.0" MODULES["puppetlabs-apt"]="1.1.0"
MODULES["puppetlabs-haproxy"]="0.4.1" MODULES["puppetlabs-haproxy"]="0.4.1"
MODULES["puppetlabs-mysql"]="0.6.1" MODULES["puppetlabs-mysql"]="0.6.1"
MODULES["puppetlabs-postgresql"]="2.3.0" MODULES["puppetlabs-postgresql"]="3.0.0"
MODULES["puppetlabs-stdlib"]="3.2.0" MODULES["puppetlabs-stdlib"]="3.2.0"
MODULES["saz-memcached"]="2.0.2" MODULES["saz-memcached"]="2.0.2"
MODULES["saz-gearman"]="2.0.1" MODULES["saz-gearman"]="2.0.1"

View File

@ -241,50 +241,33 @@ class jenkins::slave(
require => Database_user['openstack_citest@localhost'], require => Database_user['openstack_citest@localhost'],
} }
if ($::operatingsystem != 'Fedora') {
$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': class { 'postgresql::server':
config_hash => { postgres_password => 'insecure_slave',
'postgres_password' => 'insecure_slave', manage_firewall => false,
'manage_redhat_firewall' => false, listen_addresses => '127.0.0.1',
'listen_addresses' => '127.0.0.1',
},
require => Class['postgresql::params'], require => Class['postgresql::params'],
} }
class { 'postgresql::devel': class { 'postgresql::lib::devel':
require => Class['postgresql::params'], require => Class['postgresql::params'],
} }
# Create DB user and explicitly make it non superuser # Create DB user and explicitly make it non superuser
# that can create databases. # that can create databases.
postgresql::database_user { 'openstack_citest': postgresql::server::role { 'openstack_citest':
password_hash => 'openstack_citest', password_hash => postgresql_password('openstack_citest', 'openstack_citest'),
createdb => true, createdb => true,
superuser => false, superuser => false,
require => Class['postgresql::server'], require => Class['postgresql::server'],
} }
postgresql::db { 'openstack_citest': postgresql::server::db { 'openstack_citest':
user => 'openstack_citest', user => 'openstack_citest',
password => 'openstack_citest', password => postgresql_password('openstack_citest', 'openstack_citest'),
grant => 'all', grant => 'all',
require => [ require => [
Class['postgresql::server'], Class['postgresql::server'],
Postgresql::Database_user['openstack_citest'], Postgresql::Server::Role['openstack_citest'],
], ],
} }
@ -293,7 +276,7 @@ class jenkins::slave(
postgresql_psql { 'ALTER DATABASE openstack_citest OWNER TO openstack_citest': postgresql_psql { 'ALTER DATABASE openstack_citest OWNER TO openstack_citest':
db => 'postgres', db => 'postgres',
refreshonly => true, refreshonly => true,
subscribe => Postgresql::Db['openstack_citest'], subscribe => Postgresql::Server::Db['openstack_citest'],
} }
} }