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