Skip to content
Snippets Groups Projects
Commit d7d32e7b authored by Benjamin Graillot's avatar Benjamin Graillot
Browse files

[bind-authoritative] Deploy zone file on slaves

parent 30cd13c7
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,14 @@
# Deplay authoritative DNS server
- hosts: sputnik.adm.crans.org
vars:
bind:
master: false
master_ip: 10.231.136.118
zones:
- crans.org
- crans.eu
- crans.fr
roles:
- bind-authoritative
......
......@@ -6,3 +6,16 @@
register: apt_result
retries: 3
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
# {{ 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 %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment