Skip to content

Commit e696278

Browse files
committed
Make downgrade pip task configurable
1 parent 6d7e738 commit e696278

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ django_dependency_pip_packages: []
6666

6767
## pip
6868
django_use_regular_old_pip: true
69+
intall_custom_pip_version: false
6970
django_pip_paths:
7071
- "{{ django_checkout_path }}/requirements.txt"
7172

tasks/install.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@
132132
become: true
133133
become_user: "{{ django_system_user }}"
134134

135-
- name: Downgrade pip
136-
shell: /home/kpi/.virtualenvs/kpi/bin/pip3 install "pip<24.1"
135+
- name: Install a custom pip version
136+
shell: "{{ django_venv_path }}/bin/pip3 install '{{ custom_pip_version }}'"
137137
become: true
138138
become_user: "{{ django_system_user }}"
139+
when:
140+
- intall_custom_pip_version| bool
139141

140142
- name: Install Python packages using pip
141143
ansible.builtin.pip:

0 commit comments

Comments
 (0)