Find and fetch PostgreSQL dumps
This commit is contained in:
parent
0e23bef788
commit
bedc5cf081
2 changed files with 14 additions and 0 deletions
13
playbooks/backup/postgres.yml
Normal file
13
playbooks/backup/postgres.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- hosts: postgres.crypto-libertarian.com
|
||||
tasks:
|
||||
- name: Find PostgreSQL dumps
|
||||
find:
|
||||
paths: '/var/lib/postgresql/backups/12/main'
|
||||
register: postgresql_dumps
|
||||
|
||||
- name: Fetch PostgreSQL dumps
|
||||
fetch:
|
||||
src: '{{ item }}'
|
||||
dest: ../../backups
|
||||
with_items: "{{ postgresql_dumps.files | map(attribute='path') | list }}"
|
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
- import_playbook: git.yml
|
||||
- import_playbook: postgres.yml
|
||||
|
|
Reference in a new issue