Skip to content

Commit 7742845

Browse files
committed
Check pip & change default executable_pip variable
1 parent 29e8e41 commit 7742845

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

defaults/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ py_version: 2.7.9 # same as AWS
33

44
# executable names
55
executable_easy_install: easy_install-2.7
6-
executable_pip: pip2.7
6+
executable_pip: pip-2.7
77
executable_python: python2.7
88

99
# additional packages

tasks/main.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,23 @@
1515
environment:
1616
PATH: /usr/local/bin:/usr/bin:{{ ansible_env.PATH }}
1717

18+
- name: try {{ executable_pip }}
19+
command: "{{ executable_pip }} --version"
20+
register: pip_check
21+
ignore_errors: True
22+
changed_when: False
23+
environment:
24+
PATH: /usr/local/bin:/usr/bin:{{ ansible_env.PATH }}
25+
1826
- include: aws.yml
1927
when:
2028
- ansible_distribution == 'Amazon'
21-
- python_check|failed
29+
- python_check|failed or easy_install_check|failed or pip_check|failed
2230

2331
- include: centos6.yml
2432
when:
2533
- ansible_distribution != 'Amazon'
26-
- python_check|failed or easy_install_check|failed
34+
- python_check|failed or easy_install_check|failed or pip_check|failed
2735

2836
- include: packages.yml
2937
- include: ve.yml

0 commit comments

Comments
 (0)