Specify order of cron command in daily.local and fix full deletion of the cron
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
c1f66a92e2
commit
0615d3b555
|
@ -79,25 +79,33 @@
|
|||
- name: cron job for /etc/.git status is installed
|
||||
lineinfile:
|
||||
path: /etc/daily.local
|
||||
line: "{{ item }}"
|
||||
line: '/usr/local/bin/git --git-dir=/etc/.git --work-tree=/etc status --short'
|
||||
owner: root
|
||||
mode: "0644"
|
||||
create: true
|
||||
when: etc_git_monitor_status
|
||||
tags:
|
||||
- etc-git
|
||||
with_items:
|
||||
- 'next_part "Checking /etc git status:"'
|
||||
- '/usr/local/bin/git --git-dir=/etc/.git --work-tree=/etc status --short'
|
||||
|
||||
- name: cron job for /etc/.git status is installed - next_part
|
||||
lineinfile:
|
||||
path: /etc/daily.local
|
||||
line: 'next_part "Checking /etc git status:"'
|
||||
insertbefore: '/usr/local/bin/git --git-dir=/etc/.git --work-tree=/etc status --short'
|
||||
when: etc_git_monitor_status
|
||||
tags:
|
||||
- etc-git
|
||||
|
||||
- name: cron job for /etc/.git status is removed
|
||||
lineinfile:
|
||||
path: /etc/daily.local
|
||||
line:
|
||||
'/usr/local/bin/git --git-dir=/etc/.git --work-tree=/etc status --short'
|
||||
line: "{{ item }}"
|
||||
owner: root
|
||||
mode: "0644"
|
||||
state: absent
|
||||
with_items:
|
||||
- 'next_part "Checking /etc git status:"'
|
||||
- '/usr/local/bin/git --git-dir=/etc/.git --work-tree=/etc status --short'
|
||||
when: not etc_git_monitor_status
|
||||
tags:
|
||||
- etc-git
|
||||
|
|
Loading…
Reference in New Issue