我将使用中的木偶绑定模块
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'), {})
{}
的默认结果将(正确地)导致不创建任何资源。