Describe the Bug
$listen_addresses doesn't work for Arrays
Expected Behavior
If I specify $listen_addresses as an Array of IPs, I expect them to show up in the postgresql config, but only the first one shows up.
REFERENCE.md:
listen_addresses
Data type: Optional[Variant[String[1], Array[String[1]]]]
Address list on which the PostgreSQL service will listen
Steps to Reproduce
Steps to reproduce the behavior:
class { '::postgresql::server':
listen_addresses => [ $facts['networking']['ip'], '127.0.0.1'],
}
# grep 127.0.0.1 postgresql.conf
# grep $(puppet facts networking.ip | jq -r .[]) postgresql.conf
listen_addresses = '192.168.104.11'
#
Environment
- 10.6.1 and older, also main
- Tested on Ubuntu 24.04, 22.04.
Additional Context
class { '::postgresql::server':
listen_addresses => [ $facts['networking']['ip'], '127.0.0.1' ].join(','),
}
# grep 127.0.0.1 postgresql.conf
listen_addresses = '192.168.104.12,127.0.0.1'
#
as a workaround works. There is some sanity checking, but this escapes that checking luckily.
Describe the Bug
$listen_addressesdoesn't work for ArraysExpected Behavior
If I specify
$listen_addressesas an Array of IPs, I expect them to show up in the postgresql config, but only the first one shows up.REFERENCE.md:
Steps to Reproduce
Steps to reproduce the behavior:
Environment
Additional Context
as a workaround works. There is some sanity checking, but this escapes that checking luckily.