klips/ansible/plays/bookstack-backup.yml

19 lines
523 B
YAML
Raw Permalink Normal View History

---
2020-06-12 04:35:55 +00:00
- hosts: docker-host
become: yes
tasks:
- name: Create backup directory if it doesn't exist
file:
path: /home/bookstackuser/backups
state: directory
- name: Backup Bookstack container files
archive:
path: /home/bookstackuser/docker-bookstack
dest: /home/bookstackuser/backups/bookstack.tgz
- name: Fetching backup files from remote host
synchronize:
src: /home/bookstackuser/backups/
dest: /home/ansibleuser/backups/
mode: pull