OP#207fix variable relationship and add firewall rule
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
# @example confdroid_postgresql::bouncer::bouncer_rule { 'test connection':
|
# @example confdroid_postgresql::bouncer::bouncer_rule { 'test connection':
|
||||||
# pl_bouncer_db_name => 'test',
|
# pl_bouncer_db_name => 'test',
|
||||||
# pl_bouncer_host => '127.0.0.7',
|
# pl_bouncer_host => '127.0.0.7',
|
||||||
# pl_bouncer_port => '5432',
|
# pl_bouncer_host_port => '5432',
|
||||||
# pl_bouncer_user => 'test_user',
|
# pl_bouncer_user => 'test_user',
|
||||||
# pl_bouncer_order => '001',
|
# pl_bouncer_order => '001',
|
||||||
# }
|
# }
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# @see https://www.postgresql.org/docs/9.6/static/auth-pg-hba-conf.html
|
# @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_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_host IP of the db host to bounce to
|
||||||
# @param [String] pl_bouncer_port port of the db host to bounce to
|
# @param [String] pl_bouncer_host_port port of the db host to bounce to
|
||||||
# @param [String] pl_bouncer_user user for the connection. Must be defined in
|
# @param [String] pl_bouncer_user user for the connection. Must be defined in
|
||||||
# userlist.txt
|
# userlist.txt
|
||||||
# @param [String] pl_bouncer_order the order in which the rule should appear
|
# @param [String] pl_bouncer_order the order in which the rule should appear
|
||||||
@@ -14,7 +14,7 @@ define confdroid_postgresql::bouncer::bouncer_rule (
|
|||||||
|
|
||||||
String $pl_bouncer_db_name = undef,
|
String $pl_bouncer_db_name = undef,
|
||||||
String $pl_bouncer_host = '127.0.0.1',
|
String $pl_bouncer_host = '127.0.0.1',
|
||||||
String $pl_bouncer_port = '5432',
|
String $pl_bouncer_host_port = '5432',
|
||||||
String $pl_bouncer_user = undef,
|
String $pl_bouncer_user = undef,
|
||||||
String $pl_bouncer_order = undef,
|
String $pl_bouncer_order = undef,
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,13 @@ class confdroid_postgresql::firewall::iptables (
|
|||||||
dport => $pl_fw_port,
|
dport => $pl_fw_port,
|
||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
|
if $pl_use_pg_bouncer == true {
|
||||||
|
firewall { "${pl_fw_rule_order}${pl_bouncer_port} tcp port ${pl_bouncer_port}":
|
||||||
|
source => $pl_source_range,
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pl_bouncer_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= @pl_bouncer_db_name %> = host=<%= @pl_bouncer_host %> port=<%= @pl_bouncer_port %> auth_user=<%= @pl_bouncer_user %> dbname=<%= @pl_bouncer_db_name %>
|
<%= @pl_bouncer_db_name %> = host=<%= @pl_bouncer_host %> port=<%= @pl_bouncer_host_port %> auth_user=<%= @pl_bouncer_user %> dbname=<%= @pl_bouncer_db_name %>
|
||||||
|
|||||||
Reference in New Issue
Block a user