openstack-ansible-pip_install/templates/pip.conf.j2

25 lines
687 B
Django/Jinja

# {{ ansible_managed }}
{% set pip_links_host_list = pip_links | map(attribute='link') | map('netloc_no_port') | list %}
{% set trusted_host_list = pip_links_host_list | union([ pip_default_index | netloc_no_port ]) %}
[global]
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 }}
upgrade-strategy = {{ pip_upgrade_strategy }}
pre = {{ pip_enable_pre_releases }}
{% if pip_links | length > 0 %}
find-links =
{% for pip_link in pip_links %}
{{ pip_link.link }}
{% endfor %}
{% endif %}