forked from evolix/ansible-roles
bind: log file tasks are idempotent
This commit is contained in:
parent
9c3e73c494
commit
c6e81bf4b7
|
@ -60,13 +60,24 @@
|
|||
state: link
|
||||
notify: restart bind
|
||||
|
||||
- name: Create log file
|
||||
- name: is there a log file?
|
||||
stat:
|
||||
path: "{{ bind_chroot_root }}/var/log/bind.log"
|
||||
register: bind_log
|
||||
|
||||
- name: create log file
|
||||
file:
|
||||
path: "{{ bind_chroot_root }}/var/log/bind.log"
|
||||
state: touch
|
||||
when: not bind_log.stat.exists
|
||||
|
||||
- name: verify log file permissions
|
||||
file:
|
||||
path: "{{ bind_chroot_root }}/var/log/bind.log"
|
||||
mode: "0640"
|
||||
owner: bind
|
||||
group: bind
|
||||
state: touch
|
||||
mode: "0640"
|
||||
state: file
|
||||
|
||||
- name: Create log symlink
|
||||
file:
|
||||
|
|
Loading…
Reference in a new issue