When updating zones, restart dns stack also on satellite machines
This commit is contained in:
parent
2e4466d8f3
commit
c059caa5a8
|
@ -7,3 +7,38 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0600
|
mode: 0600
|
||||||
notify: restart nsd
|
notify: restart nsd
|
||||||
|
|
||||||
|
- name: Ensure zones src directory is present
|
||||||
|
file:
|
||||||
|
path: /etc/nsd/src_zones
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0750
|
||||||
|
|
||||||
|
- name: Ensure main zone stub is present
|
||||||
|
template:
|
||||||
|
src: templates/zone_stub.conf.j2
|
||||||
|
dest: "/etc/nsd/src_zones/{{ main_zone.name }}.conf"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0640
|
||||||
|
vars:
|
||||||
|
name: "{{ main_zone.name }}"
|
||||||
|
mx_records: "{{ main_zone.records|json_query('[?type==`MX`]') }}"
|
||||||
|
records: "{{ main_zone.records|json_query('[?type!=`MX`]') }}"
|
||||||
|
notify: restart dns
|
||||||
|
|
||||||
|
- name: Ensure zones stubs are present
|
||||||
|
template:
|
||||||
|
src: templates/zone_stub.conf.j2
|
||||||
|
dest: "/etc/nsd/src_zones/{{ item.name }}.conf"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0640
|
||||||
|
vars:
|
||||||
|
name: "{{ item.name }}"
|
||||||
|
mx_records: "{{ item.records|json_query('[?type==`MX`]') }}"
|
||||||
|
records: "{{ item.records|json_query('[?type!=`MX`]') }}"
|
||||||
|
loop: "{{ zones }}"
|
||||||
|
notify: restart dns
|
||||||
|
|
Loading…
Reference in New Issue
Block a user