123456789101112131415161718192021222324252627282930313233 |
- - name: 'Remove bind9 (not a suitable dnscache) packages'
- apt:
- pkg: '{{ item }}'
- state: 'absent'
- purge: 'yes'
- with_items:
- - 'bind9'
- when: with_dnscache
- tags:
- - 'dns'
- - name: 'Install unbound (dnscache) packages'
- apt:
- pkg: '{{ item }}'
- state: 'present'
- with_items:
- - 'unbound'
- when: with_dnscache
- tags:
- - 'dns'
- - name: 'Install resolv.conf'
- template:
- src: 'dns/resolv.conf.j2'
- dest: '/etc/resolv.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- when: with_dnscache or (nameservers is defined and nameservers)
- tags:
- - 'dns'
- # vim: ft=yaml.ansible
|