provizanta.bind

Ansible Role: Bind

Main Build Status

This role installs and sets up a bind9 DNS server.

Requirements

No special requirements.

Role Variables

The following variables can be set in defaults/main.yml:

  • dns_use_rfc1918_zones: true
  • dns_zones: {}
  • dns_options:
    • directory: "/var/cache/bind"
    • forwarders: []
    • allow-query:
      • any
    • dnssec-validation: auto
    • zone-statistics: none
    • max-cache-size: 100m
    • listen-on-v6:
      • any
    • version: none

Dependencies

There are no dependencies.

Example Playbook

This example playbook sets up DNS zones for all hosts in the inventory (excluding localhost) and feeds them directly into the dns_zones variable.

- name: Setup DNS
  hosts: all
  roles:
    - role: ansible-role-bind
      vars:
        dns_use_rfc1918_zones: true
        dns_zones:
          test.example.com:
            records: |-
              {%- set hosts=dict() -%}
              {%- for host in (groups['all'] | difference('localhost') | unique) -%}
              {%-   set _ = hosts.update({ host : { 'host': hostvars[host]['ansible_host'], 'type': 'A'}}) -%}
              {%- endfor -%}{{ hosts }}
            config:
              type: master
              # allow_transfer: []
              also-notify: []
              allow-update:
                - key rndc-key
        dns_options:
          directory: "/var/cache/bind"
          forwarders: []
          allow-query:
            - any
          dnssec-validation: auto
          zone-statistics: none
          max-cache-size: 100m
          listen-on-v6:
            - any
          version: none

License

MIT License

Author Information

Tibor Csóka

Informazioni sul progetto

"Install and configure bind9 DNS server."

Installa
ansible-galaxy install provizanta.bind
Licenza
mit
Download
1.4k
Proprietario