etc-git: use a dedicated cron file for etc-git-status
This commit is contained in:
parent
825352ca0a
commit
d5984fae76
4
etc-git/files/etc-git-status.j2
Normal file
4
etc-git/files/etc-git-status.j2
Normal file
|
@ -0,0 +1,4 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
@hourly who > /dev/null || git --git-dir=/etc/.git --work-tree=/etc status --short
|
||||
21 21 * * * git --git-dir=/etc/.git --work-tree=/etc status --short
|
|
@ -89,23 +89,11 @@
|
|||
tags:
|
||||
- etc-git
|
||||
|
||||
- name: regularly check for uncommited changes (if no one is connected)
|
||||
cron:
|
||||
name: git-status-except-connected
|
||||
special_time: "hourly"
|
||||
user: root
|
||||
job: "who > /dev/null || git --git-dir=/etc/.git --work-tree=/etc status --short"
|
||||
state: "{{ etc_git_monitor_status | bool | ternary('present','absent') }}"
|
||||
tags:
|
||||
- etc-git
|
||||
|
||||
- name: daily check for uncommited changes
|
||||
cron:
|
||||
name: git-status
|
||||
user: root
|
||||
hour: 21
|
||||
minute: 21
|
||||
job: "git --git-dir=/etc/.git --work-tree=/etc status --short"
|
||||
- name: Cron job for /etc/.git status
|
||||
template:
|
||||
src: etc-git-status.j2
|
||||
dest: /etc/cron.d/etc-git-status
|
||||
mode: "0644"
|
||||
state: "{{ etc_git_monitor_status | bool | ternary('present','absent') }}"
|
||||
tags:
|
||||
- etc-git
|
||||
|
|
Loading…
Reference in a new issue