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
|
state: link
|
||||||
notify: restart bind
|
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:
|
file:
|
||||||
path: "{{ bind_chroot_root }}/var/log/bind.log"
|
path: "{{ bind_chroot_root }}/var/log/bind.log"
|
||||||
mode: "0640"
|
|
||||||
owner: bind
|
owner: bind
|
||||||
group: bind
|
group: bind
|
||||||
state: touch
|
mode: "0640"
|
||||||
|
state: file
|
||||||
|
|
||||||
- name: Create log symlink
|
- name: Create log symlink
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in a new issue