Insert the default IP address into `named.conf.options`.
- name: Configure BIND
become: true
- copy:
+ template:
src: named.conf.options
dest: /etc/bind/named.conf.options
owner: bind
// listen-on-v6 { any; };
// allow-transfer { trusted; };
- allow-query { localhost; 192.168.0.0/16; 10.0.0.0/8; };
- allow-recursion { localhost; 192.168.0.0/16; 10.0.0.0/8; };
+ allow-query { localhost; {{ ansible_facts.default_ipv4.address }}/32; 192.168.0.0/16; 10.0.0.0/8; };
+ allow-recursion { localhost; {{ ansible_facts.default_ipv4.address }}/32; 192.168.0.0/16; 10.0.0.0/8; };
};