1
0
Fork 0

Find and fetch PostgreSQL dumps

This commit is contained in:
Alex Kotov 2020-07-05 14:52:08 +05:00
parent 0e23bef788
commit bedc5cf081
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 14 additions and 0 deletions

View 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 }}"

View file

@ -1,2 +1,3 @@
---
- import_playbook: git.yml
- import_playbook: postgres.yml