Puppet Class: confdroid_postgresql::params

Summary

Class contains all parameters for the confdroid_postgresql module.

Overview

confdroid_postgresql::params.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)

Parameters:

  • pl_server_fqdn (String) (defaults to: undef)

    the fqdn of the postgresql server. Any other system will be configured as client

  • reqpackages_server (Array) (defaults to: ['postgresql-server','postgresql-contrib'])

    the packages for the server

  • reqpackages_extensions (String) (defaults to: 'timescaledb')

    the packages for extensions

  • reqpackages_client (String) (defaults to: 'postgresql')

    the packages for the client

  • pkg_ensure (String) (defaults to: 'latest')

    which version of the packages to install, i.e. ‘latest’, ‘present’ ‘13.20’,

  • pl_fw_rule_order (String) (defaults to: '50')

    the prefix for the firewall rule

  • pl_fw_port (String) (defaults to: '5432')

    the port to use for service and firewall

  • pl_source_range (String) (defaults to: '0.0.0.0/0')

    the source range for allowed clients

  • pl_enable_fw (Boolean) (defaults to: true)

    whether to enable the firewall

  • pl_listen_address (String) (defaults to: '*')

    which address should the service listen on

  • pl_listen_port (String) (defaults to: '5432')

    which port should the service listen on

  • pl_max_conn (String) (defaults to: '100')

    maximum connections the service will accept

  • pl_ssl_enabled (Boolean) (defaults to: false)

    whether SSL is enabled (true) or disabled (false)

  • pl_server_crt (String) (defaults to: 'server.crt')

    the name of the server cert

  • pl_server_key (String) (defaults to: 'server.key')

    the name of the server key

  • pl_ca_crt (String) (defaults to: 'root.crt')

    the name of the CA crt

  • pl_manage_content (Boolean) (defaults to: true)

    whether to manage roles and databases

  • pl_manage_extensions (Boolean) (defaults to: false)

    whether to manage extensions

  • pl_use_exporter (Boolean) (defaults to: false)

    whether to use the postgresql-exporter

  • pl_install_dir (String) (defaults to: '/opt/postgres-exporter')

    the path for the postgres-exporter files

  • pl_idle_timeout (String) (defaults to: '60000')

    idle_in_transaction_session_timeout



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'manifests/params.pp', line 29

class confdroid_postgresql::params (

  String $pl_server_fqdn    = undef,

  # installation
  Array $reqpackages_server       = ['postgresql-server','postgresql-contrib'],
  String $reqpackages_extensions  = 'timescaledb',
  String $reqpackages_client      = 'postgresql',
  String $pkg_ensure              = 'latest',

  # firewall
  String $pl_fw_rule_order        = '50',
  String $pl_fw_port              = '5432',
  String $pl_source_range         = '0.0.0.0/0',
  Boolean $pl_enable_fw           = true,

  # main config
  String $pl_listen_address       = '*',
  String $pl_listen_port          = '5432',
  String $pl_max_conn             = '100',
  String $pl_idle_timeout         = '60000',
  Boolean $pl_ssl_enabled         = false,
  String $pl_server_crt           = 'server.crt',
  String $pl_server_key           = 'server.key',
  String $pl_ca_crt               = 'root.crt',
  Boolean $pl_manage_content      = true,
  Boolean $pl_manage_extensions   = false,

  # postgresql exporter
  Boolean $pl_use_exporter        = false,
  String $pl_install_dir          = '/opt/postgres-exporter',

  # 

) {
  $fqdn                     = $facts['networking']['fqdn']
  $domain                   = $facts['networking']['domain']
  $os_name                  = $facts['os']['name']
  $os_release               = $facts['os']['release']['major']

  # Directories
  $pl_data_dir              = '/var/lib/pgsql/data/'

  # files
  $pl_pg_hba_conf           = "${pl_data_dir}/pg_hba.conf"
  $pl_pg_hba_rule_conf      = 'confdroid_postgresql/server/pghba/pg_hba_rule.conf.erb'
  $pl_pg_hba_conf_erb       = 'confdroid_postgresql/server/pghba/pg_hba.conf.erb'

  # Service
  $pl_service               = 'postgresql'
  $pl_exporter_service      = 'postgres_exporter'

  # includes must be last
  include confdroid_postgresql::main::config
}