ansible-collection-nameserver/roles/replica/tasks/config.yml
2020-11-19 00:21:11 +01:00

35 lines
787 B
YAML

---
- name: render nsd main config
template:
src: etc/nsd/nsd.conf.j2
dest: /etc/nsd/nsd.conf
owner: root
group: root
mode: 0644
notify: reload nsd
- name: render nsd server config
template:
src: etc/nsd/nsd.conf.d/00-server.conf.j2
dest: /etc/nsd/nsd.conf.d/00-server.conf
owner: root
group: root
mode: 0644
notify: reload nsd
- name: render nsd replica configs
template:
src: etc/nsd/nsd.conf.d/10-replica.conf.j2
dest: "/etc/nsd/nsd.conf.d/{{ 10+i }}-replica-{{ item.primary }}.conf"
owner: root
group: root
mode: 0644
vars:
primary: "{{ item.primary }}"
masters: "{{ item.masters }}"
zones: "{{ item.zones }}"
loop: "{{ nsd_zone_groups }}"
loop_control:
index_var: i
notify: reload nsd