provizanta.bind
Ansible-Rolle: Bind
Installiere und konfiguriere einen bind9 DNS-Server.
Anforderungen
Keine
Variablen der Rolle
Diese Variablen sind in defaults/main.yml definiert:
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
Abhängigkeiten
Keine
Beispiel-Playbook
Das Beispiel-Playbook enthält ein Verfahren, um alle Inventar-Hosts (außer localhost
) zu extrahieren und sie direkt in die Variable dns_zones
einzufügen, die bereitgestellt werden soll.
- name: Konsolidieren
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
Lizenz
MIT
Autoreninformation
Tibor Csóka
Installieren
ansible-galaxy install provizanta.bind
Lizenz
mit
Downloads
1.4k
Besitzer