etc-git: remove cron file if needed

This commit is contained in:
Jérémy Lecour 2018-09-08 01:05:58 +02:00
parent d5984fae76
commit 46a9b4f43e
2 changed files with 10 additions and 2 deletions

View File

@ -89,11 +89,19 @@
tags:
- etc-git
- name: Cron job for /etc/.git status
- name: Cron job for /etc/.git status is installed
template:
src: etc-git-status.j2
dest: /etc/cron.d/etc-git-status
mode: "0644"
state: "{{ etc_git_monitor_status | bool | ternary('present','absent') }}"
when: etc_git_monitor_status
tags:
- etc-git
- name: Cron job for /etc/.git status is removed
file:
dest: /etc/cron.d/etc-git-status
state: absent
when: not etc_git_monitor_status
tags:
- etc-git