在木偶hiera中,我有一个工作结构
location_cfg_append: {allow: "127.0.0.1"
deny: "all"}我可以用下面的结构来替换它吗?
cf_ips:
allow: "127.0.0.1"
deny: "all"
location_cfg_append: %{hiera('cf_ips')}发布于 2019-07-08 19:26:54
在使用the hiera lookup function时,您必须将其用作字符串插值函数,因为结果将转换为字符串,这可能会导致错误。但是,您可以使用the alias function,它保留了变量类型,例如
cf_ips:
allow: "127.0.0.1"
deny: "all"
location_cfg_append: "%{alias('cf_ips')}"https://stackoverflow.com/questions/28579885
复制相似问题