Disable the pip version check
In our logs it is frequent that the warning to upgrade the pip version is present, but this warning is unnecessary as we are always using a well tested version of pip. To reduce noise, we set disable the version check. This has the added benefit of not adding more internet access to every pip task than is necessary. In the template we ensure that the var is interpreted as a boolean (in case of user error), then force it to lower case as that's what pip prefers in pip.conf. We also now remove the test for the self check file, as it will no longer be present with this option implemented. Change-Id: Ie0427d3435270836302441b92eaff7e7980d7047
This commit is contained in:
parent
40373daf7e
commit
70b8cd5737
|
@ -65,6 +65,7 @@ pip_validate_certs: "yes"
|
|||
pip_configure: true
|
||||
|
||||
# Options for pip global
|
||||
pip_disable_version_check: true
|
||||
pip_enable_pre_releases: true
|
||||
pip_timeout: 120
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
{% set trusted_host_list = pip_links_host_list | union([ pip_default_index | netloc_no_port ]) %}
|
||||
|
||||
[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 %}
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
stat:
|
||||
path: "{{ ansible_env.HOME}}/.cache/pip"
|
||||
register: pip_dir
|
||||
- name: Check selfcheck json file
|
||||
stat:
|
||||
path: "{{ ansible_env.HOME}}/.cache/pip/selfcheck.json"
|
||||
register: pip_selfcheck_file
|
||||
- name: Get pip path
|
||||
command: which pip
|
||||
register: pip_path
|
||||
|
@ -44,5 +40,4 @@
|
|||
assert:
|
||||
that:
|
||||
- "pip_dir.stat.isdir"
|
||||
- "pip_selfcheck_file.stat.exists"
|
||||
- "pip_version.stdout | search('9.0.3')"
|
||||
|
|
Loading…
Reference in New Issue