1 - name: Check named.conf.options
2 shell: "grep -c '^\\s*allow-query' /etc/bind/named.conf.options || echo 0"
4 changed_when: named_conf.stdout == "0"
7 msg: "BIND has already been configured"
8 when: named_conf.stdout != "0"
15 install_recommends: no
20 when: named_conf.stdout == "0"
22 - name: Configure BIND
25 src: named.conf.options
26 dest: /etc/bind/named.conf.options
30 when: named_conf.stdout == "0"
37 when: named_conf.stdout == "0"