- name: Backup SpamAssassin DB
shell: "sa-learn --sync && exec sa-learn --backup >~/tmp/sa-learn.backup@{{ inventory_hostname }}"
- name: Fetch SpamAssassin DB backup
- synchronize:
+ ansible.posix.synchronize:
src: "~/tmp/sa-learn.backup@{{ inventory_hostname }}"
dest: "~/tmp/sa-learn.backup@{{ inventory_hostname }}"
mode: pull
- block:
- name: Push combined SpamAssassin DB backup
- synchronize:
+ ansible.posix.synchronize:
src: "~/tmp/sa-learn.backup"
dest: "~/tmp/sa-learn.backup"
- name: Restore combined SpamAssassin DB
gather_facts: false
tasks:
- name: "Update ~root - sync directories from ~phd"
- synchronize:
+ ansible.posix.synchronize:
src: "~phd/{{ item }}"
dest: ~root
archive: no # avoid setting owner/group
mode: "0600"
force: no
loop: ['hotlist', 'ini', 'panels.ini']
-