base: do not fail when the prune entry is root's only cron line
grep -v exits 1 when it prints nothing, and with pipefail that failed the task on both hosts, although the crontab had been rewritten correctly. Ignore grep's exit status. Assisted-by: Claude:fable-5-2
This commit is contained in:
parent
e76d2a022c
commit
33fbc06681
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@
|
|||
- name: Drop the old prune entry from root's crontab
|
||||
ansible.builtin.shell: |
|
||||
set -o pipefail
|
||||
crontab -l | grep -v 'docker image prune' | crontab -
|
||||
crontab -l | { grep -v 'docker image prune' || true; } | crontab -
|
||||
args:
|
||||
executable: /bin/bash
|
||||
when: "'docker image prune' in root_crontab.stdout"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue