rewrite restore logic

This commit is contained in:
ace
2023-07-21 17:14:47 +03:00
parent a20385be58
commit e201c69b36
7 changed files with 51 additions and 26 deletions

View File

@ -6,7 +6,10 @@
- name: Merge backup options for PostgreSQL config
set_fact:
postgresql_combined_parameters: "{{ postgresql_combined_parameters | combine(postgresql_backup_parameters|default({}), recursive=true) }}"
when:
- name: Merge restore options for PostgreSQL config
set_fact:
postgresql_combined_parameters: "{{ postgresql_combined_parameters | combine(postgresql_restore_parameters|default({}), recursive=true) }}"
- name: Propagate PostgreSQL configs
block:

View File

@ -27,6 +27,10 @@
- name: Include data direcory
include_tasks: data_dir.yaml
- name: "Manage TLS/SSL certificates"
include_tasks: cacert.yaml
when: postgresql_ssl
- name: Include WAL-G role
ansible.builtin.include_role:
name: wal-g
@ -39,7 +43,7 @@
- name: Include PostgreSQL restore
include_tasks: restore.yaml
when: postgresql_wal_g_restore
when: postgresql_wal_g_restore_from_backup
- name: PostgreSQL Initdb
shell: "/usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb --username {{ postgresql_superuser_username }} --auth-host {{ postgresql_password_encryption_algorithm }}"