netzwirt.bind
Ansible Bind
- 管理 Bind 配置文件。区域文件必须在其他地方管理。
- 该角色将仅从
bind_lookup_zones
复制主文件。 - 从主服务器构建从服务器,无需配置区域。
配置:
本地 Ansible 机器上主区域文件的查找路径,相对于剧本(playbook)。
bind_lookup_zones: path/to/zones_dir
ACLs
在 named.conf.options 中创建 Bind ACLs。
bind_acls:
v6localhost:
- ::1/128
some_random_networks:
- 8.0.0.0/8
- 169.254.0.0/16
dns64 客户端
在 named.conf.options 中创建 dns64 客户端列表。
bind_dns64_clients:
- v6localhost
统计通道
启用 statistics-channels。这允许通过像 Prometheus bind_exporter 这样的系统进行监控。
bind_statistics_channels:
- inet: 127.0.0.1
port: 8053
allow:
- 127.0.0.1
区域定义
区域定义为字典。键用作域名。
secondary
是可选的。type
默认为 "master"。- 当
type
设置为 "slave" 时,secondary
属性用作主服务器。
bind_zones:
example.com:
secondary:
- '10.100.2.1'
type: master
foobar.com:
secondary:
- '10.100.2.3'
type: slave
可选:允许进行递归查询的 IP 列表。
bind_recursion_allowed_clients:
- 127.0.0.1
- 127.0.0.2
可选:使用 ipv4、ipv6 或任何协议。
bind_use_protocol: any
可选:定义监听地址。默认:Bind 会监听所有接口。
bind_listen: []
可选:定义转发器。如果你定义了转发器但没有区域文件,Bind 将仅设置为转发模式。
bind_forwarders:
- 8.8.8.8
- 8.8.4.4
可选:是否包含 RFC-1918 区域(真|假)。
bind_rfc1918: any
从主区域构建从服务器
设置 bind_create_slave_from_master
以创建从服务器,而无需定义区域。
bind_create_slave_from_master:
- master: 'master-ns'
- master_address:
- 10.100.2.20
依赖关系
无。
示例剧本
---
- hosts: bind
become: yes
roles:
- { role: netzwirt.bind }
许可证
BSD
作者信息
安装
ansible-galaxy install netzwirt.bind
许可证
Unknown
下载
183
拥有者