【发布时间】:2022-07-14 19:40:31
【问题描述】:
我正在使用来自https://forge.puppet.com/modules/puppetlabs/postgresql/7.5.0 的 puppet 模块 postgresql,并且在 hiera 中声明了以下内容
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'
这会产生以下警告,
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
尝试创建 hba 规则但失败并显示“在目录中未找到” - 我能否获得帮助以了解为什么无法按预期工作?
如果需要,我可以提供更多日志。
谢谢
【问题讨论】:
-
Hiera 数据本身不会产生任何东西(包括错误)。涉及的 Puppet DSL 代码是什么?是否涉及任何其他 Hiera 数据?作为minimal reproducible example,请。
-
清单中唯一的 Puppet 代码是包含 postgresql::server 在 hiera 我包含了这个并且文件资源已更新 postgresql::globals: manage_pg_hba_conf: 'true' pg_hba_conf_path: '/var/lib/ pgsql/14/data/pg_hba.conf'
-
@ssaini 你能告诉我如何解决这个问题吗?我也有同样的问题。
-
@Maryam 在下面看到我刚刚添加的答案
标签: postgresql puppet