You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
461 B
YAML
20 lines
461 B
YAML
---
|
|
- set_fact:
|
|
backup_path: "/backups"
|
|
|
|
- name: "Create backup directory"
|
|
file:
|
|
path: "{{ backup_path }}"
|
|
state: directory
|
|
owner: "postgres"
|
|
group: "postgres"
|
|
|
|
- name: "Creating backup ${dbname}__{{ custom_backup_name }}.sql ..."
|
|
become: true
|
|
become_user: postgres
|
|
postgresql_db:
|
|
name: "{{ item.name }}"
|
|
state: dump
|
|
target: "{{ backup_path }}/{{ item.name }}__{{ custom_backup_name }}.sql"
|
|
loop: "{{ postgres_acls }}"
|