[bind-authoritative] Deploy zone file on slaves
parent
30cd13c791
commit
d7d32e7b90
|
@ -22,6 +22,14 @@
|
||||||
|
|
||||||
# Deplay authoritative DNS server
|
# Deplay authoritative DNS server
|
||||||
- hosts: sputnik.adm.crans.org
|
- hosts: sputnik.adm.crans.org
|
||||||
|
vars:
|
||||||
|
bind:
|
||||||
|
master: false
|
||||||
|
master_ip: 10.231.136.118
|
||||||
|
zones:
|
||||||
|
- crans.org
|
||||||
|
- crans.eu
|
||||||
|
- crans.fr
|
||||||
roles:
|
roles:
|
||||||
- bind-authoritative
|
- bind-authoritative
|
||||||
|
|
||||||
|
|
|
@ -6,3 +6,16 @@
|
||||||
register: apt_result
|
register: apt_result
|
||||||
retries: 3
|
retries: 3
|
||||||
until: apt_result is succeeded
|
until: apt_result is succeeded
|
||||||
|
|
||||||
|
- name: Deploy Bind9 configuration
|
||||||
|
template:
|
||||||
|
src: bind/named.conf.local
|
||||||
|
dest: /etc/bind/named.conf.local
|
||||||
|
mode: 0644
|
||||||
|
owner: root
|
||||||
|
group: bind
|
||||||
|
|
||||||
|
- name: Reload Bind9
|
||||||
|
systemd:
|
||||||
|
name: bind9
|
||||||
|
state: reloaded
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if not bind.master %}
|
||||||
|
{% for zone in bind.zones %}
|
||||||
|
zone "{{ zone }}" {
|
||||||
|
type slave;
|
||||||
|
masters { {{ bind.master_ip }}; };
|
||||||
|
file "bak.{{ zone }}";
|
||||||
|
allow-transfer { "none"; };
|
||||||
|
notify no;
|
||||||
|
};
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue