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 }}"
21 echo 'zone "{{ domain }}" {
23 file "/etc/bind/{{ domain }}";
26 };' >> /etc/bind/named.conf.local
29 - name: Update resolver config
32 path: /etc/resolv.conf
33 regexp: "^domain {{ domain }}"
34 line: "domain {{ domain }}"
41 when: not domain_exists.stat.exists