mirror of
https://gitea.0xace.cc/ansible-galaxy/postgresql.git
synced 2025-06-28 18:03:08 +00:00
use postgresql_home_dir
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
name: wal-g
|
||||
vars:
|
||||
wal_g_pg: yes
|
||||
wal_g_pg_home_dir: "{{ postgresql_base_dir }}"
|
||||
wal_g_pg_home_dir: "{{ postgresql_home_dir }}"
|
||||
wal_g_pg_data_dir: "{{ postgresql_data_dir }}"
|
||||
wal_g_restore: "{{ postgresql_wal_g_restore }}"
|
||||
when: postgresql_wal_g_install
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
- name: Set facts about needed vars
|
||||
set_fact:
|
||||
postgresql_base_dir: "{{ postgresql_base_dir }}"
|
||||
postgresql_home_dir: "{{ postgresql_home_dir }}"
|
||||
postgresql_data_dir: "{{ postgresql_data_dir }}"
|
||||
|
||||
- name: "Set locale for PostgreSQL"
|
||||
|
@ -29,12 +29,12 @@
|
||||
- postgresql_files_found.matched == 0
|
||||
block:
|
||||
- name: Restore database dir from backup
|
||||
shell: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_base_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' backup-fetch ' ~ postgresql_data_dir ~ ' ' ~ postgresql_wal_g_postgresql_pitr }}"
|
||||
shell: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_home_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' backup-fetch ' ~ postgresql_data_dir ~ ' ' ~ postgresql_wal_g_postgresql_pitr }}"
|
||||
become_user: postgres
|
||||
|
||||
- name: Include PostgreSQL configuration
|
||||
vars:
|
||||
postgresql_restore_command: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_base_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' wal-fetch %f %p' }}"
|
||||
postgresql_restore_command: "{{ postgresql_wal_g_binary_name ~ ' --config ' ~ postgresql_home_dir ~ '/' ~ postgresql_wal_g_restore_config_name ~ ' wal-fetch %f %p' }}"
|
||||
include_tasks: config.yaml
|
||||
|
||||
- name: Create recovery.signal file
|
||||
|
Reference in New Issue
Block a user