fix: use reload for zone changed
This commit is contained in:
parent
216888000d
commit
6fc55cf5b6
3 changed files with 8 additions and 3 deletions
|
@ -2,3 +2,8 @@
|
||||||
service:
|
service:
|
||||||
name: bind9
|
name: bind9
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: reload bind
|
||||||
|
service:
|
||||||
|
name: bind9
|
||||||
|
state: reloaded
|
||||||
|
|
|
@ -61,14 +61,14 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_dict: '{{ bind_zones }}'
|
with_dict: '{{ bind_zones }}'
|
||||||
register: zone
|
register: zone
|
||||||
notify: restart bind
|
notify: reload bind
|
||||||
tags: bind
|
tags: bind
|
||||||
|
|
||||||
- name: dnssec sign
|
- name: dnssec sign
|
||||||
shell: 'cd /etc/bind/keys && dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ item.item.key }} -t /etc/bind/zones/db.{{ item.item.key }}'
|
shell: 'cd /etc/bind/keys && dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N INCREMENT -o {{ item.item.key }} -t /etc/bind/zones/db.{{ item.item.key }}'
|
||||||
with_items: '{{ zone.results }}'
|
with_items: '{{ zone.results }}'
|
||||||
when: item.changed and item.item.value.dnssec is defined and item.item.value.dnssec
|
when: item.changed and item.item.value.dnssec is defined and item.item.value.dnssec
|
||||||
notify: restart bind
|
notify: reload bind
|
||||||
tags: bind
|
tags: bind
|
||||||
|
|
||||||
- name: add cron dnssec
|
- name: add cron dnssec
|
||||||
|
|
|
@ -9,4 +9,4 @@ dnssec-signzone -3 $(head -n 1000 /dev/urandom | sha1sum | cut -b 1-16) -A -N IN
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
systemctl restart bind9
|
systemctl reload bind9
|
||||||
|
|
Loading…
Reference in a new issue