Update pip primary and fallback URL's, and set version
This patch updates the primary and secondary locations for downloading the get-pip.py script and also sets the installation process to ensure that a known, stable version of pip is installed. Change-Id: Ib463f61b1ad44aec0e3953a89d58596c3e87f2e0
This commit is contained in:
parent
bc70ba1b50
commit
820c9bd6c3
|
@ -14,9 +14,9 @@
|
|||
# limitations under the License.
|
||||
|
||||
## Path to pip download/installation script.
|
||||
pip_upstream_repo_url: https://raw.github.com/pypa/pip/7.1.1/contrib
|
||||
pip_get_pip_url: "{{ pip_upstream_repo_url }}/get-pip.py"
|
||||
pip_get_pip_fallback_url: https://bootstrap.pypa.io/get-pip.py
|
||||
pip_upstream_url: https://bootstrap.pypa.io/get-pip.py
|
||||
pip_fallback_url: https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py
|
||||
pip_version: "7.1.2"
|
||||
|
||||
# Additional options that you might want to pass to "get-pip.py" when installing pip.
|
||||
# Default `pip_get_pip_options` is an empty string.
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
- name: Get Modern PIP
|
||||
get_url:
|
||||
url: "{{ pip_get_pip_url }}"
|
||||
url: "{{ pip_upstream_url }}"
|
||||
dest: "/opt/get-pip.py"
|
||||
force: "yes"
|
||||
validate_certs: "yes"
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
- name: Get Modern PIP using fallback URL
|
||||
get_url:
|
||||
url: "{{ pip_get_pip_fallback_url }}"
|
||||
url: "{{ pip_fallback_url }}"
|
||||
dest: "/opt/get-pip.py"
|
||||
force: "yes"
|
||||
validate_certs: "yes"
|
||||
|
@ -69,7 +69,7 @@
|
|||
- pip-install
|
||||
|
||||
- name: Install PIP
|
||||
shell: "python /opt/get-pip.py {{ pip_get_pip_options }}"
|
||||
shell: "python /opt/get-pip.py {{ pip_get_pip_options }} 'pip=={{ pip_version }}'"
|
||||
ignore_errors: true
|
||||
register: pip_install
|
||||
until: pip_install | success
|
||||
|
@ -79,7 +79,7 @@
|
|||
- pip-install
|
||||
|
||||
- name: Install PIP (fall back mode)
|
||||
shell: "python /opt/get-pip.py --isolated"
|
||||
shell: "python /opt/get-pip.py --isolated {{ pip_get_pip_options }} 'pip=={{ pip_version }}'"
|
||||
when: pip_install.rc != 0
|
||||
register: pip_install_fall_back
|
||||
until: pip_install_fall_back | success
|
||||
|
|
Loading…
Reference in New Issue