3
0

OP#203 add bouncer to installation

This commit is contained in:
12ww1160
2025-12-04 20:58:19 +01:00
parent 6a8e2f2e35
commit 9df1304812
3 changed files with 11 additions and 2 deletions

View File

@@ -28,7 +28,8 @@ Optional:
* manage single line entries in pg_hba via define
* manage roles and databases via define (set `$pl_manage_content` to true)
* manage extensions (set `pl_manage_extenuios`to `true`)
* manage extensions (set `pl_manage_extensions`to `true`)
* install and manage pg_bouncer (set `pl_use_pg_bouncer`to `true`)
## Repo Documentation

View File

@@ -18,6 +18,11 @@ class confdroid_postgresql::main::install (
ensure => $pkg_ensure,
}
}
if $pl_use_pg_bouncer == true {
package { $reqpackages_bouncer:
ensure => $pkg_ensure,
}
}
}
if $fqdn != $pl_server_fqdn {

View File

@@ -25,6 +25,7 @@
# @param [Boolean] pl_use_exporter whether to use the postgresql-exporter
# @param [String] pl_install_dir the path for the postgres-exporter files
# @param [String] pl_idle_timeout idle_in_transaction_session_timeout
# @param [Boolean] pl_use_pg_bouncer whether to use the pc_bouncer
##############################################################################
class confdroid_postgresql::params (
@@ -34,6 +35,7 @@ class confdroid_postgresql::params (
Array $reqpackages_server = ['postgresql-server','postgresql-contrib'],
String $reqpackages_extensions = 'timescaledb',
String $reqpackages_client = 'postgresql',
String $reqpackages_bouncer = 'pgbouncer',
String $pkg_ensure = 'latest',
# firewall
@@ -58,7 +60,8 @@ class confdroid_postgresql::params (
Boolean $pl_use_exporter = false,
String $pl_install_dir = '/opt/postgres-exporter',
#
# pg bouncer
Boolean $pl_use_pg_bouncer = false,
) {
$fqdn = $facts['networking']['fqdn']