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