add restore from backup support

This commit is contained in:
ace
2023-02-17 18:13:08 +03:00
parent 4f40c189f7
commit a2cfbde7e3
7 changed files with 42 additions and 40 deletions

View File

@ -23,6 +23,23 @@
disable_gpg_check: yes
register: postgresql_setup
- name: Include data direcory
include_tasks: data_dir.yaml
- name: Include WAL-G role
ansible.builtin.include_role:
name: wal-g
vars:
wal_g_pg: yes
wal_g_pg_home_dir: "{{ postgresql_base_dir }}"
wal_g_pg_data_dir: "{{ postgresql_data_dir }}"
wal_g_restore: "{{ postgresql_wal_g_restore }}"
when: postgresql_wal_g_install
- name: Include PostgreSQL restore
include_tasks: restore.yaml
when: postgresql_wal_g_restore
- name: PostgreSQL Initdb
shell: "/usr/pgsql-{{ postgresql_major_version }}/bin/postgresql-{{ postgresql_major_version }}-setup initdb"
register: initdb
@ -32,11 +49,3 @@
- name: "Configure PostgreSQL"
include_tasks: config.yaml
tags: postgresql_configuration
- name: Include WAL-G role
ansible.builtin.include_role:
name: wal-g
vars:
wal_g_pg: yes
when: postgresql_wal_g_install