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.
18 lines
568 B
YAML
18 lines
568 B
YAML
---
|
|
- name: "Creating backup directory <{{ backup_directory }}>"
|
|
ansible.builtin.file:
|
|
path: "{{ backup_directory }}"
|
|
state: directory
|
|
owner: "postgres"
|
|
group: "postgres"
|
|
mode: '0755'
|
|
|
|
- name: "Handle backup state <{{ postgres_backup_state }}> with suffix <{{ custom_backup_name }}>"
|
|
community.postgresql.postgresql_db:
|
|
name: "{{ item.name }}"
|
|
state: "{{ postgres_backup_state }}"
|
|
target: "{{ backup_directory }}/{{ item.name }}__{{ custom_backup_name }}.sql.gz"
|
|
loop: "{{ postgres_acls }}"
|
|
become_user: postgres
|
|
become: true
|