[英]puppet use hiera with module
我将使用来自的人偶绑定模块
https://github.com/thias/puppet-bind
任何想法,我怎么能用yaml格式使用hiera?
我已经尝试在Hiera中使用它,但是它不会将值传递给模块。
---
classes:
- 'bind::server'
profile::bind::conf:
'/etc/named.conf':
zones:
'example.com': ['type master', 'file ]
有什么建议么?
参数不能自动绑定到模块的类-通过define
创建区域。
在Hiera中为define
实例创建值需要两个步骤。
例如
bind_server_confs:
'/etc/named.conf':
zones:
'example.com': ['type master', 'file ]
create_resources
函数从哈希创建资源。 喜欢
create_resources('bind::server::conf', hiera('bind_server_confs'), {})
{}
的默认结果将(正确)导致没有资源被创建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.