nsd/tasks/main.yml
Baptiste Jonglez 6538ccda29 NSD: Reload database after having rebuilt it
Also don't restart nsd when changing zone configuration, rebuild + reload
is enough.
2017-09-01 10:20:48 +02:00

33 lines
970 B
YAML

---
- name: Install nsd3
apt: pkg=nsd3 state=present
- name: Create primary zone directory
file: path={{ primary_zones_dir }} state=directory owner=root group=root mode=0755
- name: Create secondary zone directory
file: path={{ secondary_zones_dir }} state=directory owner=nsd group=nsd mode=0755
- name: Create base nsd3 configuration file
template: src=config.j2 dest={{ nsd_config_dir }}/nsd.conf owner=root group=root mode=0644
notify:
- restart nsd3
- name: Configure nsd3 zones
template: src=zones_config.j2 dest={{ zones_config_file }} owner=root group=root mode=0644
notify:
- rebuild nsd3 database
- reload nsd3 database
- name: Copy content of primary nsd3 zones
copy: src="files/nsd/{{ item.zone_filename }}" dest="{{ primary_zones_dir }}/{{ item.zone_filename }}" owner=root group=root mode=0644
with_items: "{{ nsd_primary_zones }}"
notify:
- rebuild nsd3 database
- reload nsd3 database
- notify slaves