3
0
Files
confdroid_postgresql/manifests/params.pp

71 lines
2.9 KiB
ObjectPascal

## postgresql_cd::params.pp
# Module name: postgresql_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @param [String] pl_server_fqdn the fqdn of the postgresql server. Any other
# system will be configured as client
# @param [Array] reqpackages_server the packages for the server
# @param [String] reqpackages_client the packages for the client
# @param [String] pkg_ensure which version of the packages to install, i.e.
# 'latest', 'present' '13.20',
# @param [String] pl_fw_rule_order the prefix for the firewall rule
# @param [String] pl_fw_port the port to use for service and firewall
# @param [String] pl_source_range the source range for allowed clients
# @param [Boolean] pl_enable_fw whether to enable the firewall
# @param [String] pl_listen_address which address should the service listen on
# @param [String] pl_listen_port which port should the service listen on
# @param [String] pl_max_conn maximum connections the service will accept
# @param [Boolean] pl_ssl_enabled whether SSL is enabled (true) or disabled (false)
# @param [String] pl_server_crt the name of the server cert
# @param [String] pl_server_key the name of the server key
# @param [String] pl_ca_crt the name of the CA crt
# @param [Boolean] pl_manage_roles Whether to manage roles
# @param [Boolean] pl_manage_databases Whether to manage databases
# @summary Class contains all parameters for the postgresql_cd module.
##############################################################################
class postgresql_cd::params (
String $pl_server_fqdn = undef,
# installation
Array $reqpackages_server = ['postgresql-server','postgresql-contrib'],
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',
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_roles = true,
Boolean $pl_manage_databases = true,
) {
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
# Service
$pl_service = 'postgresql'
# Directories
$pl_data_dir = '/var/lib/pgsql/data/'
# files
$pl_pg_hba_conf = "${pl_data_dir}/pg_hba.conf"
$pl_pg_hba_rule_conf = 'postgresql_cd/server/pghba/pg_hba_rule.conf.erb'
$pl_pg_hba_conf_erb = 'postgresql_cd/server/pghba/pg_hba.conf.erb'
# includes must be last
include postgresql_cd::main::config
}