Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PIP_BREAK_SYSTEM_PACKAGES to the pip module #486

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
ansible.builtin.pip:
name: netaddr
become: false
environment:
PIP_BREAK_SYSTEM_PACKAGES: "1"

...
2 changes: 2 additions & 0 deletions molecule/pg_upgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@
ansible.builtin.pip:
name: netaddr
become: false
environment:
PIP_BREAK_SYSTEM_PACKAGES: "1"

...
9 changes: 9 additions & 0 deletions roles/patroni/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}"
Expand All @@ -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({}) }}"
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/update/tasks/patroni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions roles/upgrade/tasks/pre_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down