3 path: "/etc/bind/{{ domain }}"
4 register: domain_exists
5 changed_when: not domain_exists.stat.exists
8 - name: Copy domain template
12 dest: "/etc/bind/{{ domain }}"
18 - name: Update domain config
24 file "/etc/bind/{{ domain }}";
27 };' >> /etc/bind/named.conf.local
30 - name: Update resolver config
33 path: /etc/resolv.conf
34 regexp: "^domain {{ domain }}"
35 line: "domain {{ domain }}"
42 when: not domain_exists.stat.exists