From 2b09e7ac057dd2c03f3be90cabed802627ba9696 Mon Sep 17 00:00:00 2001 From: DimentR Date: Wed, 4 Aug 2021 15:00:29 +0000 Subject: [PATCH 1/2] fix } --- tasks/variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/variables.yml b/tasks/variables.yml index 1592771..0c2a6c0 100644 --- a/tasks/variables.yml +++ b/tasks/variables.yml @@ -17,7 +17,7 @@ - name: Define postgresql_apt_filename. set_fact: - postgresql_apt_filename: "{{ __postgresql_apt_filename }" + postgresql_apt_filename: "{{ __postgresql_apt_filename }}" when: postgresql_apt_filename is not defined when: ansible_os_family == 'Debian' From 67c344f9b8e1788b836f0b7076e30ccba5ed7049 Mon Sep 17 00:00:00 2001 From: DimentR Date: Thu, 5 Aug 2021 12:42:29 +0000 Subject: [PATCH 2/2] install patroni from repo, if install from pip false --- defaults/main.yml | 3 +++ tasks/install.yml | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 809751b..7ad340f 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,6 +18,9 @@ patroni_pip_packages: - { name: "setuptools", state: "latest", umask: "0022", executable: "pip3" } - { name: "patroni[{{ patroni_dcs }}]", state: "present", umask: "0022", executable: "pip3" } +patroni_repo_packages: + - { name: "patroni", state: "present" } + patroni_replication_username: replicator patroni_replication_password: repuserpasswd patroni_superuser_username: postgres diff --git a/tasks/install.yml b/tasks/install.yml index 5ed25c6..7cc790b 100755 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -27,3 +27,11 @@ with_items: - "{{ patroni_pip_packages }}" when: patroni_install_from_pip + +- name: Install patroni from repo + package: + name: "{{ item.name }}" + state: "{{ item.state }}" + with_items: + - "{{ patroni_repo_packages }}" + when: not patroni_install_from_pip