forked from evolix/ansible-roles
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:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
||||||
- name: regularly check for uncommited changes (if no one is connected)
|
- name: Cron job for /etc/.git status
|
||||||
cron:
|
template:
|
||||||
name: git-status-except-connected
|
src: etc-git-status.j2
|
||||||
special_time: "hourly"
|
dest: /etc/cron.d/etc-git-status
|
||||||
user: root
|
mode: "0644"
|
||||||
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"
|
|
||||||
state: "{{ etc_git_monitor_status | bool | ternary('present','absent') }}"
|
state: "{{ etc_git_monitor_status | bool | ternary('present','absent') }}"
|
||||||
tags:
|
tags:
|
||||||
- etc-git
|
- etc-git
|
||||||
|
|
Loading…
Reference in a new issue