]> git.phdru.name Git - ansible.git/blobdiff - playbooks/debian/sa-merge-all.yml
Fix(sa-merge-all): Fix file name (`.` -> `@`)
[ansible.git] / playbooks / debian / sa-merge-all.yml
index 7c35a9331ee76271891886d7248982ea976bb547..3157f30ee40212d4c7d9925cbfa48c1643562424 100644 (file)
@@ -15,7 +15,7 @@
           state: stopped
 
       - name: Backup SpamAssassin DB
-        shell: "exec sa-learn --backup >~/tmp/sa-learn.backup@{{ inventory_hostname }}"
+        shell: "sa-learn --sync && exec sa-learn --backup >~/tmp/sa-learn.backup@{{ inventory_hostname }}"
       - name: Fetch SpamAssassin DB backup
         synchronize:
           src: "~/tmp/sa-learn.backup@{{ inventory_hostname }}"
@@ -24,7 +24,7 @@
       when: inventory_hostname != 'localhost'
 
     - name: Combine SpamAssassin DB backups
-      shell: "cd ~/tmp && exec cat sa-learn.backup.* >sa-learn.backup"
+      shell: "cd ~/tmp && exec cat sa-learn.backup@* >sa-learn.backup"
       when: inventory_hostname == 'localhost'
 
     - block:
@@ -32,7 +32,7 @@
         synchronize:
           src: "~/tmp/sa-learn.backup"
           dest: "~/tmp/sa-learn.backup"
-      - name: Combine SpamAssassin DB backups
+      - name: Restore combined SpamAssassin DB
         shell: "cd tmp && sa-learn --clear && sa-learn --restore sa-learn.backup && exec sa-learn --sync"
 
       - name: Start SpamAssassin