]> git.ekhem.eu.org Git - cron.git/commitdiff
Skip ansible scripts when clearing /tmp.
authorJakub Czajka <jakub@ekhem.eu.org>
Sat, 6 Dec 2025 16:47:21 +0000 (17:47 +0100)
committerJakub Czajka <jakub@ekhem.eu.org>
Sat, 6 Dec 2025 16:55:13 +0000 (17:55 +0100)
Ansible scripts for performing backup are put in /tmp. Removing them
inside the script breaks the workflow.

backup.yaml

index 6e1a6747a205046f6fdc5cd984f1f1d553b29daa..41f30d7f7e4d265a08d30902face17f17c7fa34d 100644 (file)
@@ -15,7 +15,7 @@
         state: latest
       become: true
     - name: Clear /tmp
-      shell: rm --recursive --force /tmp/*
+      shell: rm --recursive --force /tmp/!\(backup\|sources\).yaml
       become: true
     - name: Dump database to /tmp/database
       command: pg_dumpall --user=postgres --clean --file=/tmp/database