Fix python2 check
Print python_version to the console for debugging purposes and fix the python2 check condition. Change-Id: I31511d5ac848f4648b230221e1e11f711fb6b918
This commit is contained in:
parent
deb3e5bc8d
commit
2e28d75956
@ -44,13 +44,17 @@
|
||||
command: "python --version"
|
||||
register: python_version
|
||||
|
||||
- name: download get-pip.py
|
||||
get_url: url=https://bootstrap.pypa.io/pip/2.7/get-pip.py dest=/tmp
|
||||
when: '"2.7" in python_version.stdout'
|
||||
- name: Print python version
|
||||
debug:
|
||||
var: python_version
|
||||
|
||||
- name: download get-pip.py
|
||||
- name: download get-pip.py for python 2.7
|
||||
get_url: url=https://bootstrap.pypa.io/pip/2.7/get-pip.py dest=/tmp
|
||||
when: '"2.7" in python_version.stderr'
|
||||
|
||||
- name: download get-pip.py for ptython 2.6
|
||||
get_url: url=https://bootstrap.pypa.io/pip/2.6/get-pip.py dest=/tmp
|
||||
when: '"2.6" in python_version.stdout'
|
||||
when: '"2.6" in python_version.stderr'
|
||||
|
||||
- name: install pip
|
||||
become: true
|
||||
|
Loading…
Reference in New Issue
Block a user