995e1983f2
* Add param `validcon_path` in `postgresql::client` (defaults to previous hard coded value). * Add tests for this new parameter. All tests runs successfully on Scientific Linux 6.4 ``` $ bundle exec rake spec SPEC_OPTS='--format documentation' [...] Finished in 2 minutes 10.5 seconds (files took 1.4 seconds to load) 201 examples, 0 failures ```
25 lines
719 B
Puppet
25 lines
719 B
Puppet
# Install client cli tool. See README.md for more details.
|
|
class postgresql::client (
|
|
$file_ensure = 'file',
|
|
$validcon_script_path = $postgresql::params::validcon_script_path,
|
|
$package_name = $postgresql::params::client_package_name,
|
|
$package_ensure = 'present'
|
|
) inherits postgresql::params {
|
|
validate_absolute_path($validcon_script_path)
|
|
validate_string($package_name)
|
|
|
|
package { 'postgresql-client':
|
|
ensure => $package_ensure,
|
|
name => $package_name,
|
|
tag => 'postgresql',
|
|
}
|
|
|
|
file { $validcon_script_path:
|
|
ensure => $file_ensure,
|
|
source => 'puppet:///modules/postgresql/validate_postgresql_connection.sh',
|
|
owner => 0,
|
|
group => 0,
|
|
mode => '0755',
|
|
}
|
|
|
|
}
|