X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fdebian%2Fsa-merge-all.yml;h=3157f30ee40212d4c7d9925cbfa48c1643562424;hb=99c79f9a766275068b170d2a20cfe294b3133ca0;hp=7c35a9331ee76271891886d7248982ea976bb547;hpb=f469669e463367cbdad0d4842ace6308c1bbe312;p=ansible.git diff --git a/playbooks/debian/sa-merge-all.yml b/playbooks/debian/sa-merge-all.yml index 7c35a93..3157f30 100644 --- a/playbooks/debian/sa-merge-all.yml +++ b/playbooks/debian/sa-merge-all.yml @@ -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