Fix these log touch plays to also be idempotent

This commit is contained in:
Kevin Fenzi 2014-05-27 18:15:04 +00:00
parent 6f947cd9ec
commit 8906975d33
2 changed files with 14 additions and 0 deletions

View file

@ -93,8 +93,15 @@
tags:
- files
- name: check log file
command: stat /var/log/askfedora.log
register: logstat
always_run: yes
changed_when: "1 != 1"
- name: log ownership fix
file: state=touch dest=/var/log/askbot/askfedora.log owner=apache group=apache
when: logstat.rc == 1
- name: run collectstatic
command: creates=/var/www/html/askbot/static python /etc/askbot/sites/ask/config/manage.py collectstatic --noinput

View file

@ -61,6 +61,12 @@
- name: ensure selinux lets httpd talk to postgres
seboolean: name=httpd_can_network_connect_db persistent=yes state=yes
- name: check log file
command: stat /var/log/fedoratagger.log
register: logstat
always_run: yes
changed_when: "1 != 1"
- name: ensure cronjob log file is writable
file: >
dest=/var/log/fedoratagger.log
@ -69,6 +75,7 @@
tags:
- cron
- config
when: logstat.rc == 1
- name: setup the cronjob
copy: >