79d2ab3f0b
Removed references to netloc_no_port as it will be taken out from openstack-ansible-plugins. Now using ansible 2.4's urlsplit filter as a replacement. Change-Id: If28c8bf2856ebb9a1cab4759b3ddc5b6c4685abf Related-Bug: #1820830
26 lines
810 B
Django/Jinja
26 lines
810 B
Django/Jinja
# {{ ansible_managed }}
|
|
{% set pip_links_host_list = pip_links | map(attribute='link') | map('urlsplit', 'hostname') | list %}
|
|
{% set trusted_host_list = pip_links_host_list | union([ pip_default_index | urlsplit('hostname') ]) %}
|
|
|
|
[global]
|
|
disable-pip-version-check = {{ (pip_disable_version_check | bool) | lower }}
|
|
timeout = {{ pip_timeout }}
|
|
index-url = {{ pip_default_index }}
|
|
{% if trusted_host_list | length > 0 %}
|
|
trusted-host =
|
|
{% for host in trusted_host_list %}
|
|
{{ host }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
[install]
|
|
upgrade = {{ (pip_upgrade | bool) | lower }}
|
|
upgrade-strategy = {{ pip_upgrade_strategy }}
|
|
pre = {{ (pip_enable_pre_releases | bool) | lower }}
|
|
{% if pip_links | length > 0 %}
|
|
find-links =
|
|
{% for pip_link in pip_links %}
|
|
{{ pip_link.link }}
|
|
{% endfor %}
|
|
{% endif %}
|