diff --git a/playbooks/remove-autorestic.yaml b/playbooks/remove-autorestic.yaml index fc613e9..8545c2b 100644 --- a/playbooks/remove-autorestic.yaml +++ b/playbooks/remove-autorestic.yaml @@ -51,12 +51,13 @@ steps: sudo: true - name: Remove autorestic systemd unit files - shell: rm -f /etc/systemd/system/autorestic-backup.service \ - /etc/systemd/system/autorestic-backup.timer \ - /etc/systemd/system/autorestic-prune.service \ - /etc/systemd/system/autorestic-prune.timer + # Glob, not a list of explicit paths. A previous version used + # `rm -f path1 \` + newline + `path2`, which gets bitten by YAML + # plain-scalar folding: the backslash + newline collapses to a + # literal `\ ` and only the first path gets removed. The glob is + # also idempotent on hosts where the files are already gone. + shell: rm -f /etc/systemd/system/autorestic-*.service /etc/systemd/system/autorestic-*.timer sudo: true - removes: /etc/systemd/system/autorestic-backup.timer - name: systemctl daemon-reload (drop the removed units from systemd's view) shell: systemctl daemon-reload