diff --git a/manifests/params.pp b/manifests/params.pp index 71f2653..4188c3f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,6 +11,7 @@ # @param [string] pl_fw_port the port to use for service and firewall # @param [string] pl_source_range the source range for allowed clients # @param [boolean] pl_enable_fw whether to enable the firewall +# @param [string] pl_listen_address which address should the service listen on # @summary Class contains all parameters for the postgresql_cd module. ############################################################################## class postgresql_cd::params ( @@ -28,6 +29,9 @@ class postgresql_cd::params ( String $pl_source_range = '0.0.0.0/0', Boolean $pl_enable_fw = true, + # main config + String $pl_listen_address = '*', + ) { $fqdn = $facts['networking']['fqdn'] $domain = $facts['networking']['domain'] diff --git a/templates/postgresql.conf.erb b/templates/postgresql.conf.erb index 2f21664..39c151a 100644 --- a/templates/postgresql.conf.erb +++ b/templates/postgresql.conf.erb @@ -57,7 +57,7 @@ # - Connection Settings - -#listen_addresses = 'localhost' # what IP address(es) to listen on; +listen_addresses = '<%= @pl_listen_address %>' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) @@ -548,7 +548,7 @@ log_rotation_size = 0 # Automatic rotation of logfiles will # %q = stop here in non-session # processes # %% = '%' - # e.g. '<%u%%%d>' + # e.g. '<<%u%%%d>' #log_lock_waits = off # log lock waits >= deadlock_timeout #log_parameter_max_length = -1 # when logging statements, limit logged # bind-parameter values to N bytes;