3
0

add bouncer details

This commit is contained in:
12ww1160
2025-12-05 14:02:54 +01:00
parent c4fcffcb40
commit 527c6d784b
6 changed files with 448 additions and 11 deletions

View File

@@ -7,13 +7,36 @@ class confdroid_postgresql::bouncer::bouncer (
) inherits confdroid_postgresql::params {
if ($fqdn == $pl_server_fqdn) and ($pl_use_pg_bouncer == true) {
# create the pgbouncer.ini file
# ensure directory exists
file { $pl_bouncer_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
}
# create auth user file to be populated through placeholder
file { $pl_bouncer_auth_file:
ensure => file,
owner => 'pgbouncer',
group => 'pgbouncer',
mode => '0440',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($pl_bouncer_auth_erb),
}
# create the pgbouncer.ini file
concat { $pl_bouncer_ini_file:
ensure => present,
owner => 'postgres',
owner => 'pgbouncer',
mode => '0600',
notify => Service[$pl_service],
#notify => Service[$pl_service],
}
# manage file header