Reputation: 29
I am using the puppet module postgresql from https://forge.puppet.com/modules/puppetlabs/postgresql/7.5.0 and in hiera have the following declared
postgresql::server::pg_hba_rules:
"allow_subnet_1”:
description: 'Allow subnet 1'
type: 'host'
address: ’10.10.56.0/24'
database: 'foreman'
user: 'foreman'
auth_method: 'md5'
order: '201'
Which produces the following warning,
Warning: /Stage[main]/Postgresql::Server/Postgresql::Server::Pg_hba_rule[allow1]/Concat::Fragment[pg_hba_rule_allow1]/Concat_fragment[pg_hba_rule_allow1]: Target Concat_file with path of /var/lib/pgsql/14/data/pg_hba.conf not found in the catalog
There is an attempt to create a hba rule then failes with "not found in the catalog” - can I get help to why doesn't work as expected?
I can provide more logs if needed.
Thanks
Upvotes: 1
Views: 332
Reputation: 29
This worked.
To add rules:
postgresql::globals:
manage_pg_hba_conf: 'true'
postgresql::server::pg_hba_conf_path: "/nfs/pgsql/data/%{hiera('postgresql::globals::version')}/pg_hba.conf"
#postgresql::server::manage_pg_hba_conf: true
postgresql::server::pg_hba_rules:
"Allow xxx":
description: 'Allow trusted connection for the xxx server.'
type: 'host'
database: 'all'
user: 'postgres'
address: '10.10.10.1/32'
auth_method: 'trust'
"Allow xxx1":
description: 'Allow trusted connections from the monitoring host (xxx1).'
type: 'host'
database: 'postgres'
user: 'nagios'
address: '10.10.11.1/32'
auth_method: 'trust'
Upvotes: 1