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:
|
||||
name: bind9
|
||||
state: restarted
|
||||
|
||||
- name: reload bind
|
||||
service:
|
||||
name: bind9
|
||||
state: reloaded
|
||||
|
|
|
@ -61,14 +61,14 @@
|
|||
mode: 0644
|
||||
with_dict: '{{ bind_zones }}'
|
||||
register: zone
|
||||
notify: restart bind
|
||||
notify: reload bind
|
||||
tags: bind
|
||||
|
||||
- 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 }}'
|
||||
with_items: '{{ zone.results }}'
|
||||
when: item.changed and item.item.value.dnssec is defined and item.item.value.dnssec
|
||||
notify: restart bind
|
||||
notify: reload bind
|
||||
tags: bind
|
||||
|
||||
- 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 %}
|
||||
{% endfor %}
|
||||
|
||||
systemctl restart bind9
|
||||
systemctl reload bind9
|
||||
|
|
Loading…
Reference in a new issue