Merge "Make pip_index_url variable conditional"

This commit is contained in:
Zuul 2020-08-22 00:07:07 +00:00 committed by Gerrit Code Review
commit cd834045c8
2 changed files with 8 additions and 0 deletions

View File

@ -10,7 +10,9 @@
copy:
content: |
[global]
{% if pip_index_url | length > 0 -%}
index-url = {{ pip_index_url }}
{% endif -%}
{% if pip_trusted_hosts | length > 0 -%}
trusted-host =
{% for host in pip_trusted_hosts | unique -%}
@ -30,5 +32,6 @@
[easy_install]
index-url = {{ pip_index_url }}
dest: "~{{ user}}/.pydistutils.cfg"
when: pip_index_url | length > 0
become: True
become_user: "{{ user }}"

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes generation of pip configuration when using a pip proxy without
a local mirror.