我在yaml文件中有以下定义:
keepalived:
cluster_name: "cluster.example.lan"
cluster_ip: "192.168.1.10"
cluster_nic: "eth0"
haproxy:
bind_address: %{hiera('keepalived::cluster_ip')}
Run Code Online (Sandbox Code Playgroud)
结果bind_address我得到一个空字符串.
如果我使用%{hiera('keepalived')}我已经打印了整个哈希,但我只需cluster_ip要从这个哈希.我该如何查找cluster_ip?