module-postgresql/manifests/contrib.pp
Ken Barber 27c5cc0304 Provide package removal fixes for Debian tests
This patch provides fixes to help tests pass on Debian. The failures were in
relation to the lack of proper removal of the server and contrib parts. Setting
the ensure => purged parameter for removal seems to have solved a lot of this.

Also, the ordering for contrib being (un)installed needed some work.

I've also made sure we use 'purged' a lot more in tests to make sure we clean
up after ourselves properly.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00

27 lines
895 B
Puppet

# Install the contrib postgresql packaging. See README.md for more details.
class postgresql::contrib (
$package_name = $postgresql::params::contrib_package_name,
$package_ensure = 'present'
) inherits postgresql::params {
validate_string($package_name)
package { 'postgresql-contrib':
ensure => $package_ensure,
name => $package_name,
tag => 'postgresql',
}
if($package_ensure == 'present' or $package_ensure == true) {
anchor { 'postgresql::contrib::start': }->
Class['postgresql::server::install']->
Package['postgresql-contrib']->
Class['postgresql::server::service']->
anchor { 'postgresql::contrib::end': }
} else {
anchor { 'postgresql::contrib::start': }->
Class['postgresql::server::service']->
Package['postgresql-contrib']->
Class['postgresql::server::install']->
anchor { 'postgresql::contrib::end': }
}
}