2013-08-27 22:43:47 +02:00
|
|
|
# Install client cli tool. See README.md for more details.
|
2012-12-20 01:50:45 +01:00
|
|
|
class postgresql::client (
|
|
|
|
$package_name = $postgresql::params::client_package_name,
|
|
|
|
$package_ensure = 'present'
|
|
|
|
) inherits postgresql::params {
|
2013-08-27 22:43:47 +02:00
|
|
|
validate_string($package_name)
|
2012-12-20 01:50:45 +01:00
|
|
|
|
|
|
|
package { 'postgresql-client':
|
|
|
|
ensure => $package_ensure,
|
|
|
|
name => $package_name,
|
2013-02-15 11:23:18 +01:00
|
|
|
tag => 'postgresql',
|
2012-12-20 01:50:45 +01:00
|
|
|
}
|
|
|
|
|
2013-10-23 23:49:16 +02:00
|
|
|
$file_ensure = $package_ensure ? {
|
|
|
|
'present' => 'file',
|
|
|
|
true => 'file',
|
|
|
|
'absent' => 'absent',
|
|
|
|
false => 'absent',
|
|
|
|
default => 'file',
|
|
|
|
}
|
|
|
|
file { "/usr/local/bin/validate_postgresql_connection.sh":
|
|
|
|
ensure => $file_ensure,
|
|
|
|
source => "puppet:///modules/postgresql/validate_postgresql_connection.sh",
|
|
|
|
owner => 0,
|
|
|
|
group => 0,
|
|
|
|
mode => 0755,
|
|
|
|
}
|
|
|
|
|
2012-12-20 01:50:45 +01:00
|
|
|
}
|