Files
confdroid_postgresql/manifests/bouncer/bouncer_rule.pp

31 lines
1.3 KiB
ObjectPascal
Raw Normal View History

2025-12-05 14:22:43 +01:00
# confdroid_postgresql::bouncer::bouncer_rule.pp
2025-12-05 13:06:10 +01:00
# Module name: confdroid_postgresql
2025-12-05 14:22:43 +01:00
# Author: 12ww1160 (12ww1160@confdroid.com)
2025-12-05 13:06:10 +01:00
# @summary define manages rule entries for bouncer rules
# @see https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html
# @param [String] pl_bouncer_db_name db name for the bouncer rule
# @param [String] pl_bouncer_host IP of the db host to bounce to
# @param [String] pl_bouncer_port port of the db host to bounce to
2025-12-05 14:58:45 +01:00
# @param [String] pl_bouncer_user user for the connection. Must be defined in
# userlist.txt
# @param [String] pl_bouncer_order the order in which the rule should appear
2025-12-05 13:06:10 +01:00
##############################################################################
2025-12-05 14:22:43 +01:00
define confdroid_postgresql::bouncer::bouncer_rule (
2025-12-05 13:06:10 +01:00
String $pl_bouncer_db_name = undef,
String $pl_bouncer_host = '127.0.0.1',
String $pl_bouncer_port = '5432',
2025-12-05 14:58:45 +01:00
String $pl_bouncer_user = undef,
String $pl_bouncer_order = undef,
2025-12-05 13:06:10 +01:00
) {
$pl_bouncer_ini_file = $confdroid_postgresql::params::pl_bouncer_ini_file
$pl_bouncer_ini_erb = $confdroid_postgresql::params::pl_bouncer_ini_erb
concat::fragment { "pl_bouncer_rule_${name}":
target => $pl_bouncer_ini_file,
content => template($pl_bouncer_ini_erb),
2025-12-05 14:58:45 +01:00
order => $pl_bouncer_order,
2025-12-05 13:06:10 +01:00
}
}