diff --git a/consul.yml b/consul.yml index ce8cfa0a1..0812ee8df 100644 --- a/consul.yml +++ b/consul.yml @@ -43,6 +43,8 @@ name: netaddr executable: pip3 become: false + environment: + PIP_BREAK_SYSTEM_PACKAGES: "1" - name: consul.yml | Configure Consul instances hosts: consul_instances diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml index afbd2132f..4c2fa74e9 100644 --- a/molecule/default/prepare.yml +++ b/molecule/default/prepare.yml @@ -24,5 +24,7 @@ ansible.builtin.pip: name: netaddr become: false + environment: + PIP_BREAK_SYSTEM_PACKAGES: "1" ... diff --git a/molecule/pg_upgrade/prepare.yml b/molecule/pg_upgrade/prepare.yml index 01f658ddf..c5538f979 100644 --- a/molecule/pg_upgrade/prepare.yml +++ b/molecule/pg_upgrade/prepare.yml @@ -24,5 +24,7 @@ ansible.builtin.pip: name: netaddr become: false + environment: + PIP_BREAK_SYSTEM_PACKAGES: "1" ... diff --git a/roles/patroni/tasks/main.yml b/roles/patroni/tasks/main.yml index 883807da9..2a3da63dd 100644 --- a/roles/patroni/tasks/main.yml +++ b/roles/patroni/tasks/main.yml @@ -27,6 +27,7 @@ umask: "0022" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_requirements_repo | length < 1 - name: Install requirements @@ -37,6 +38,7 @@ umask: "0022" environment: PATH: "{{ ansible_env.PATH }}:{{ postgresql_bin_dir }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_requirements_repo | length < 1 - name: Install patroni @@ -48,6 +50,7 @@ umask: "0022" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_package_repo | length < 1 and patroni_install_version == "latest" - name: "Install patroni {{ patroni_install_version }}" @@ -58,6 +61,7 @@ umask: "0022" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_package_repo | length < 1 and patroni_install_version != "latest" when: installation_method == "repo" and patroni_installation_method == "pip" environment: "{{ proxy_env | default({}) }}" @@ -93,6 +97,7 @@ loop: "{{ patroni_pip_requirements_repo | map('basename') | list }}" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_requirements_repo | length > 0 - name: Install patroni @@ -104,6 +109,7 @@ loop: "{{ patroni_pip_package_repo | map('basename') | list }}" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_package_repo | length > 0 when: installation_method == "repo" and patroni_installation_method == "pip" vars: @@ -134,6 +140,7 @@ loop: "{{ patroni_pip_requirements_file | map('basename') | list }}" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_requirements_file | length > 0 - name: Install patroni @@ -145,6 +152,7 @@ loop: "{{ patroni_pip_package_file | map('basename') | list }}" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: patroni_pip_package_file | length > 0 when: installation_method == "file" and patroni_installation_method == "pip" vars: @@ -617,6 +625,7 @@ - ruamel.yaml environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" vars: ansible_python_interpreter: /usr/bin/python3 # Run PITR diff --git a/roles/update/tasks/patroni.yml b/roles/update/tasks/patroni.yml index 493939711..11569573b 100644 --- a/roles/update/tasks/patroni.yml +++ b/roles/update/tasks/patroni.yml @@ -10,6 +10,7 @@ umask: "0022" environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" when: installation_method == "repo" and patroni_installation_method == "pip" environment: "{{ proxy_env | default({}) }}" vars: diff --git a/roles/upgrade/tasks/pre_checks.yml b/roles/upgrade/tasks/pre_checks.yml index bd6ddf3c9..3e2e4641f 100644 --- a/roles/upgrade/tasks/pre_checks.yml +++ b/roles/upgrade/tasks/pre_checks.yml @@ -32,6 +32,7 @@ - pexpect environment: PATH: "{{ ansible_env.PATH }}:/usr/local/bin:/usr/bin" + PIP_BREAK_SYSTEM_PACKAGES: "1" vars: ansible_python_interpreter: /usr/bin/python3