mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-06-28 18:03:08 +00:00
add restore from backup support
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user