X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fpostgresql%2Fmanifests%2Fclient.pp;h=7e6da1c47b8905c805784e1104831febf1f0cd56;hb=a69999e580f8b3abd12446c2d6ad59e517651813;hp=fb82509becd6027825ac7f51b957f3e589c06801;hpb=e7b6b352165009c385c52fcfe5a1055690dbfa4b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/postgresql/manifests/client.pp b/3rdparty/modules/postgresql/manifests/client.pp index fb82509be..7e6da1c47 100644 --- a/3rdparty/modules/postgresql/manifests/client.pp +++ b/3rdparty/modules/postgresql/manifests/client.pp @@ -1,28 +1,25 @@ -# Class: postgresql::client -# -# This class installs postgresql client software. -# -# *Note* don't forget to make sure to add any necessary yum or apt -# repositories if specifying a custom version. -# -# Parameters: -# [*package_name*] - The name of the postgresql client package. -# [*ensure*] - the ensure parameter passed to the postgresql client package resource -# Actions: -# -# Requires: -# -# Sample Usage: -# +# Install client cli tool. See README.md for more details. class postgresql::client ( - $package_name = $postgresql::params::client_package_name, - $package_ensure = 'present' + Enum['file', 'absent'] $file_ensure = 'file', + Stdlib::Absolutepath $validcon_script_path = $postgresql::params::validcon_script_path, + String[1] $package_name = $postgresql::params::client_package_name, + String[1] $package_ensure = 'present' ) inherits postgresql::params { - package { 'postgresql-client': - ensure => $package_ensure, - name => $package_name, - tag => 'postgresql', + if $package_name != 'UNSET' { + 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', } }