Fix add of multiple evobackup cron
continuous-integration/drone/push Build is failing Details

Do not add evobackup cron again if the same line
is already there but uncommented
This commit is contained in:
Jérémy Dubois 2020-10-09 16:14:52 +02:00
parent 01158227eb
commit c1f66a92e2
1 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,15 @@
tags:
- evobackup
- name: Fetch daily.local content
command: 'grep "sh /usr/share/scripts/zzz_evobackup" /etc/daily.local'
check_mode: false
register: daily_local_content
failed_when: false
changed_when: false
tags:
- evobackup
- name: Add evobackup cron (disabled)
lineinfile:
path: /etc/daily.local
@ -17,6 +26,8 @@
owner: root
mode: "0644"
create: true
when:
- not (daily_local_content.stdout | regex_search('sh /usr/share/scripts/zzz_evobackup'))
tags:
- evobackup