From eb8478ddbca093f0045bbbf74886044375a95900 Mon Sep 17 00:00:00 2001 From: ace Date: Wed, 19 Apr 2023 15:19:52 +0300 Subject: [PATCH] fix wal-g --- tasks/main.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tasks/main.yaml b/tasks/main.yaml index 309df26..d1ed262 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -16,21 +16,29 @@ - "vars" tags: patroni_vars -- name: Set facts about needed vars +- name: Set facts about Patroni vars set_fact: patroni_postgresql_home_dir: "{{ patroni_postgresql_home_dir }}" patroni_postgresql_data_dir: "{{ patroni_postgresql_data_dir }}" +- name: Set facts about WAL-G vars + set_fact: + wal_g_pg_home_dir: "{{ wal_g_pg_home_dir }}" + wal_g_pg_data_dir: "{{ wal_g_pg_data_dir }}" + when: + - patroni_wal_g_install is defined + - patroni_wal_g_install + - name: "Set locale for PostgreSQL" include_tasks: locale.yaml tags: patroni_locale -- name: "Install Patroni repository and deps for {{ ansible_facts['os_family'] }}" +- name: "Install Patroni repository and deps for {{ ansible_facts['distribution'] }}" include_tasks: "{{ ansible_facts['os_family'] }}/patroni_repos_and_deps.yaml" when: patroni_install_official_repo tags: patroni_repos_and_deps -- name: "Install PostgreSQL for {{ ansible_facts['os_family'] }}" +- name: "Install PostgreSQL for {{ ansible_facts['distribution'] }}" include_tasks: "{{ ansible_facts['os_family'] }}/postgresql_install.yaml" tags: patroni_postgresql_install @@ -43,7 +51,7 @@ path: /etc/patroni/patroni.yaml register: patroni_config -- name: "Install Patroni for {{ ansible_facts['os_family'] }}" +- name: "Install Patroni for {{ ansible_facts['distribution'] }}" include_tasks: "{{ ansible_facts['os_family'] }}/main.yaml" tags: patroni_install