bind: log file tasks are idempotent

This commit is contained in:
Jérémy Lecour 2017-04-06 14:33:46 +02:00 committed by Jérémy Lecour
parent 9c3e73c494
commit c6e81bf4b7

View file

@ -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: