Make pip_index_url variable conditional
Setting pip's proxy variable, operator needs to set also pip_index_url, even when one wants to use default value of index_url. This patch sets pip's index_url only when pip_index_url is not empty. Change-Id: If435e9025f3d78364b229bbe4458f5f1e1ab49aa
This commit is contained in:
parent
f40dde18df
commit
7113ae4617
@ -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 }}"
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes generation of pip configuration when using a pip proxy without
|
||||
a local mirror.
|
Loading…
x
Reference in New Issue
Block a user