Fix add of multiple evobackup cron
Some checks failed
continuous-integration/drone/push Build is failing

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

View file

@ -10,6 +10,15 @@
tags: tags:
- evobackup - 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) - name: Add evobackup cron (disabled)
lineinfile: lineinfile:
path: /etc/daily.local path: /etc/daily.local
@ -17,6 +26,8 @@
owner: root owner: root
mode: "0644" mode: "0644"
create: true create: true
when:
- not (daily_local_content.stdout | regex_search('sh /usr/share/scripts/zzz_evobackup'))
tags: tags:
- evobackup - evobackup