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
(cherry picked from commit 70b8cd5737
)
This commit is contained in:
parent
e56f4a9978
commit
2b35e8158a
|
@ -101,6 +101,7 @@ pip_validate_certs: "yes"
|
|||
pip_lock_to_internal_repo: False
|
||||
|
||||
# Options for pip global
|
||||
pip_disable_version_check: true
|
||||
pip_enable_pre_releases: true
|
||||
pip_timeout: 120
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
[global]
|
||||
disable-pip-version-check = {{ (pip_disable_version_check | bool) | lower }}
|
||||
pre = {{ (pip_enable_pre_releases | bool) | lower }}
|
||||
timeout = {{ pip_timeout }}
|
||||
{% if pip_lock_to_internal_repo and pip_links | length > 0 %}
|
||||
|
|
|
@ -27,10 +27,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
|
||||
|
@ -41,5 +37,4 @@
|
|||
assert:
|
||||
that:
|
||||
- "pip_dir.stat.isdir"
|
||||
- "pip_selfcheck_file.stat.exists"
|
||||
- "pip_version.stdout | search('8.0.3')"
|
||||
|
|
Loading…
Reference in New Issue