confdroid_postgresql::exporter::dirs
diff --git a/doc/puppet_classes/confdroid_postgresql.html b/doc/puppet_classes/confdroid_postgresql.html
index 480d141..eccdd39 100644
--- a/doc/puppet_classes/confdroid_postgresql.html
+++ b/doc/puppet_classes/confdroid_postgresql.html
@@ -78,7 +78,7 @@
-
confdroid_postgresql::init.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::init.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer.html b/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer.html
new file mode 100644
index 0000000..9ecc19b
--- /dev/null
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer.html
@@ -0,0 +1,208 @@
+
+
+
+
+
+
+ Puppet Class: confdroid_postgresql::bouncer::bouncer
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: confdroid_postgresql::bouncer::bouncer
+
+
+
Summary
+ Class manages the pgbouncer service
+
+
Overview
+
+
+
+
confdroid_postgresql::bouncer::bouncer.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
+
+ # File 'manifests/bouncer/bouncer.pp', line 6
+
+class confdroid_postgresql::bouncer::bouncer (
+
+) inherits confdroid_postgresql::params {
+ if ($fqdn == $pl_server_fqdn) and ($pl_use_pg_bouncer == true) {
+ # 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 => 'pgbouncer',
+ mode => '0600',
+ #notify => Service[$pl_service],
+ }
+
+ # manage file header
+ concat::fragment { 'header':
+ target => $pl_bouncer_ini_file,
+ content => template($pl_bouncer_ini_erb),
+ order => '000',
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Aservice.html b/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Aservice.html
new file mode 100644
index 0000000..7061b68
--- /dev/null
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Abouncer_3A_3Aservice.html
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ Puppet Class: confdroid_postgresql::bouncer::service
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: confdroid_postgresql::bouncer::service
+
+
+
Summary
+ Class manages the pgbouncer service
+
+
Overview
+
+
+
+
confdroid_postgresql::bouncer::service.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+
+
+ # File 'manifests/bouncer/service.pp', line 6
+
+class confdroid_postgresql::bouncer::service (
+
+) inherits confdroid_postgresql::params {
+ if ($fqdn == $pl_server_fqdn) and ($pl_use_pg_bouncer == true) {
+ require confdroid_postgresql::bouncer::bouncer
+ service { $pl_bouncer_service:
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Adirs.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Adirs.html
index 342e5ff..17a67fd 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Adirs.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Adirs.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::exporter::dirs.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::exporter::dirs.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Afiles.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Afiles.html
index b8652f7..34109f1 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Afiles.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Afiles.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::exporter::files.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::exporter::files.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Aservice.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Aservice.html
index 7917ae5..54c8d80 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Aservice.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aexporter_3A_3Aservice.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::exporter::service.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::exporter::service.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/confdroid_postgresql_3A_3Afirewall_3A_3Aiptables.html
index a2c814b..20ac02e 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Afirewall_3A_3Aiptables.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Afirewall_3A_3Aiptables.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::firewall::iptables.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::firewall::iptables.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Aconfig.html
index c48e03a..091f1bd 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Aconfig.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Aconfig.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::main::config.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::main::config.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
@@ -112,7 +112,10 @@
14
15
16
-17
+17
+18
+19
+20
# File 'manifests/main/config.pp', line 6
@@ -120,13 +123,16 @@
class confdroid_postgresql::main::config (
) inherits confdroid_postgresql::params {
- include confdroid_postgresql::main::install
+ require confdroid_postgresql::main::install
if $fqdn == $pl_server_fqdn {
include confdroid_postgresql::server::service
# if $pl_use_exporter == true {
# include confdroid_postgresql::exporter::service
# }
+ if $pl_use_pg_bouncer == true {
+ include confdroid_postgresql::bouncer::service
+ }
}
}
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Adirs.html
index 102bcb8..27ff088 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Adirs.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Adirs.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::main::dirs.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::main::dirs.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Afiles.html
index 312210f..f0e2c9d 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Afiles.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Afiles.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::main::files.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::main::files.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Ainstall.html
index 63d3385..c67e6ef 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Ainstall.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Amain_3A_3Ainstall.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::main::install.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::main::install.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aparams.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aparams.html
index 862c92f..ead23f0 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aparams.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aparams.html
@@ -83,6 +83,10 @@
confdroid_postgresql::server::service
+
confdroid_postgresql::bouncer::bouncer
+
+
confdroid_postgresql::bouncer::service
+
confdroid_postgresql::exporter::service
confdroid_postgresql::firewall::iptables
@@ -107,7 +111,7 @@
-
confdroid_postgresql::params.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::params.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
@@ -190,6 +194,24 @@
+
+
+ reqpackages_bouncer
+
+
+ (String )
+
+
+ (defaults to: 'pgbouncer' )
+
+
+ —
+
+
the packages for the bouncer
+
+
+
+
pkg_ensure
@@ -516,15 +538,128 @@
- reqpackages_bouncer
+ pl_bouncer_listen_addr
(String )
- (defaults to: 'pgbouncer' )
+ (defaults to: '0.0.0.0' )
+ —
+
+
bouncer listen address
+
+
+
+
+
+
+ pl_bouncer_port
+
+
+ (String )
+
+
+ (defaults to: '6432' )
+
+
+ —
+
+
+
+
+
+
+ pl_bouncer_auth_mode
+
+
+ (String )
+
+
+ (defaults to: 'md5' )
+
+
+ —
+
+
+
+
+
+
+ pl_bouncer_auth_users
+
+
+ (String )
+
+
+ (defaults to: 'placeholder' )
+
+
+ —
+
+
+
+
+
+
+ pl_bouncer_pool_mode
+
+
+ (String )
+
+
+ (defaults to: 'transaction' )
+
+
+ —
+
+
+
+
+
+
+ pl_bouncer_mx_cl_conn
+
+
+ (String )
+
+
+ (defaults to: '100' )
+
+
+ —
+
+
bouncer max client connections
+
+
+
+
+
+
+ pl_bouncer_pool_size
+
+
+ (String )
+
+
+ (defaults to: '20' )
+
+
+ —
+
+
bouncer default pool size
+
+
@@ -538,14 +673,6 @@
-30
-31
-32
-33
-34
-35
-36
-37
38
39
40
@@ -594,10 +721,31 @@
83
84
85
-86
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
- # File 'manifests/params.pp', line 30
+ # File 'manifests/params.pp', line 38
class confdroid_postgresql::params (
@@ -634,6 +782,13 @@ class confdroid_postgresql::params (
# pg bouncer
Boolean $pl_use_pg_bouncer = false,
+ String $pl_bouncer_listen_addr = '0.0.0.0',
+ String $pl_bouncer_port = '6432',
+ String $pl_bouncer_auth_mode = 'md5',
+ String $pl_bouncer_auth_users = 'placeholder',
+ String $pl_bouncer_pool_mode = 'transaction',
+ String $pl_bouncer_mx_cl_conn = '100',
+ String $pl_bouncer_pool_size = '20',
) {
$fqdn = $facts['networking']['fqdn']
@@ -643,15 +798,21 @@ class confdroid_postgresql::params (
# Directories
$pl_data_dir = '/var/lib/pgsql/data/'
+ $pl_bouncer_dir = '/etc/pgbouncer'
# 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'
+ $pl_bouncer_ini_file = "${pl_bouncer_dir}/pgbouncer.ini"
+ $pl_bouncer_ini_erb = 'confdroid_postgresql/server/bouncer/pgbouncer.ini.erb'
+ $pl_bouncer_auth_file = "${pl_bouncer_dir}/userlist.txt"
+ $pl_bouncer_auth_erb = 'confdroid_postgresql/server/bouncer/bouncer_users.erb'
# Service
$pl_service = 'postgresql'
$pl_exporter_service = 'postgres_exporter'
+ $pl_bouncer_service = 'pgbouncer'
# includes must be last
include confdroid_postgresql::main::config
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Ainitdb.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Ainitdb.html
index 94e5612..8f85abe 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Ainitdb.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Ainitdb.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::server::initdb.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::server::initdb.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba.html
index 692094b..9393f44 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba.html
@@ -84,7 +84,7 @@ pg_hba_rule.pp
-
confdroid_postgresql::server::pg_hba.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@puppetsoft.com) }
+
confdroid_postgresql::server::pg_hba.pp Module name: confdroid_postgresql Author: 12ww1160 (arne_teuke@puppetsoft.com) }
diff --git a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Aservice.html
index b1b70a4..ddf201c 100644
--- a/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Aservice.html
+++ b/doc/puppet_classes/confdroid_postgresql_3A_3Aserver_3A_3Aservice.html
@@ -83,7 +83,7 @@
-
confdroid_postgresql::server::service.pp Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::server::service.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
diff --git a/doc/puppet_defined_type_list.html b/doc/puppet_defined_type_list.html
index 730f296..cdeeb1b 100644
--- a/doc/puppet_defined_type_list.html
+++ b/doc/puppet_defined_type_list.html
@@ -40,21 +40,28 @@
-
+
+
+
+
+
+
-
+
-
+
diff --git a/doc/puppet_defined_types/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer_rule.html b/doc/puppet_defined_types/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer_rule.html
new file mode 100644
index 0000000..fd74482
--- /dev/null
+++ b/doc/puppet_defined_types/confdroid_postgresql_3A_3Abouncer_3A_3Abouncer_rule.html
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+ Defined Type: confdroid_postgresql::bouncer::bouncer_rule
+
+ — Documentation by YARD 0.9.36
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Defined Type: confdroid_postgresql::bouncer::bouncer_rule
+
+
+ Defined in:
+
+ manifests/bouncer/bouncer_rule.pp
+
+
+
+
+
Summary
+ define manages rule entries for bouncer rules
+
+
Overview
+
+
+
+
confdroid_postgresql::bouncer::bouncer_rule.pp Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
+
+
+
+
+
+
+
+
+
+
+
+
+
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+
+ # File 'manifests/bouncer/bouncer_rule.pp', line 10
+
+define confdroid_postgresql::bouncer::bouncer_rule (
+
+ String $pl_bouncer_db_name = undef,
+ String $pl_bouncer_host = '127.0.0.1',
+ String $pl_bouncer_port = '5432',
+ String $pl_bounce_order = undef,
+
+) {
+ $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),
+ order => $pl_bounce_order,
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Adatabases_3A_3Adb_df.html b/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Adatabases_3A_3Adb_df.html
index 99d87ea..5d9ce48 100644
--- a/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Adatabases_3A_3Adb_df.html
+++ b/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Adatabases_3A_3Adb_df.html
@@ -76,7 +76,7 @@
-
confdroid_postgresql::server::databases::db_df Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com.com)
+
confdroid_postgresql::server::databases::db_df Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com.com)
diff --git a/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba_rule.html b/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba_rule.html
index 6f93ac7..9080c6b 100644
--- a/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba_rule.html
+++ b/doc/puppet_defined_types/confdroid_postgresql_3A_3Aserver_3A_3Apghba_3A_3Apg_hba_rule.html
@@ -76,7 +76,7 @@
-
confdroid_postgresql::server::pghba::pg_hba_rule Module name: confdroid_postgresql Author: Arne Teuke (arne_teuke@confdroid.com)
+
confdroid_postgresql::server::pghba::pg_hba_rule Module name: confdroid_postgresql Author: 12ww1160 (12ww1160@confdroid.com)
@@ -154,7 +154,7 @@
—
-
SPecify IP address or FQDN for the connection, i.e. where to connect FROM.
+
Specify IP address or FQDN for the connection, i.e. where to connect FROM.