module-postgresql/manifests/server/install.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

21 lines
581 B
Puppet

# PRIVATE CLASS: do not call directly
class postgresql::server::install {
$package_ensure = $postgresql::server::package_ensure
$package_name = $postgresql::server::package_name
$_package_ensure = $package_ensure ? {
true => 'present',
false => 'purged',
'absent' => 'purged',
default => $package_ensure,
}
package { 'postgresql-server':
ensure => $_package_ensure,
name => $package_name,
# This is searched for to create relationships with the package repos, be
# careful about its removal
tag => 'postgresql',
}
}