netzwirt.bind

Ansible Bind

  • Manage BIND configuration files. The zone files should be managed elsewhere.
  • This role will only copy the master files from bind_lookup_zones.
  • Create slave servers from the master without the need to configure zones.

Configuration:

Specify the location for master zone files on the local Ansible machine, relative to the playbook.

bind_lookup_zones: path/to/zones_dir

ACLs

Create access control lists (ACLs) in named.conf.options.

bind_acls:
  v6localhost:
    - ::1/128
  some_random_networks:
    - 8.0.0.0/8
    - 169.254.0.0/16

DNS64 Clients

Create a list of DNS64 clients in named.conf.options.

bind_dns64_clients:
  - v6localhost

Statistics Channels

Enable the use of statistics channels for monitoring with tools like Prometheus bind_exporter.

bind_statistics_channels:
  - inet: 127.0.0.1
    port: 8053
    allow:
      - 127.0.0.1

Zone Definitions

Define zones as a dictionary, where the key is the domain name.

  • secondary is optional.
  • type defaults to "master".
  • If type is set to "slave," use the secondary property as the master.
bind_zones:
  example.com:
    secondary:
      - '10.100.2.1'
    type: master

  foobar.com:
    secondary:
      - '10.100.2.3'
    type: slave

Optionally: List IPs that are allowed to perform recursive queries.

bind_recursion_allowed_clients:
  - 127.0.0.1
  - 127.0.0.2

Optionally: Specify which protocols to use (ipv4, ipv6, or any).

bind_use_protocol: any

Optionally: Define listen addresses. By default, BIND listens on all interfaces.

bind_listen: []

Optionally: Define forwarders. If forwarders are specified without zone files, BIND will operate in forwarding-only mode.

bind_forwarders:
  - 8.8.8.8
  - 8.8.4.4

Optionally: Include RFC-1918 zones (True|False).

bind_rfc1918: any

Create Slave from Master Zones

Set bind_create_slave_from_master to create a slave without needing to define zones.

bind_create_slave_from_master:
  - master: 'master-ns'
  - master_address:
    - 10.100.2.20

Dependencies

None.

Example Playbook

---
- hosts: bind
  become: yes
  roles:
    - { role: netzwirt.bind }

License

BSD

Author Information

netzwirt

Informazioni sul progetto

Install and manage Bind 9. Create slaves automaticly

Installa
ansible-galaxy install netzwirt.bind
Licenza
Unknown
Download
183
Proprietario