Puppet Class: postgresql::client

Inherits:
postgresql::params
Defined in:
manifests/client.pp

Summary

Installs PostgreSQL client software. Set the following parameters if you have a custom version you would like to install.

Overview

Note:

Make sure to add any necessary yum or apt repositories if specifying a custom version.

Parameters:

  • file_ensure (Enum['file', 'absent']) (defaults to: 'file')

    Ensure the connection validation script is present

  • validcon_script_path (Stdlib::Absolutepath) (defaults to: $postgresql::params::validcon_script_path)

    Optional. Absolute path for the postgresql connection validation script.

  • package_name (String[1]) (defaults to: $postgresql::params::client_package_name)

    Sets the name of the PostgreSQL client package.

  • package_ensure (String[1]) (defaults to: 'present')

    Ensure the client package is installed



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'manifests/client.pp', line 14

class postgresql::client (
  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 {
  if $package_name != 'UNSET' {
    package { 'postgresql-client':
      ensure => $package_ensure,
      name   => $package_name,
      tag    => 'puppetlabs-postgresql',
    }
  }

  file { $validcon_script_path:
    ensure  => $file_ensure,
    content => file('postgresql/validate_postgresql_connection.sh'),
    owner   => 0,
    group   => 0,
    mode    => '0755',
  }
}