File tree 6 files changed +24
-8
lines changed
6 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
language : python
3
3
cache : pip
4
- python : " 2.7"
4
+ python :
5
+ - " 2.7"
6
+ - " 3.5"
7
+ - " 3.6"
8
+ - " 3.7"
5
9
env :
6
10
# run against latest version
7
11
- ANSIBLE_VERSION=latest
8
12
# run against minimal required version
9
- - ANSIBLE_VERSION=2.4 .*
13
+ - ANSIBLE_VERSION=2.5 .*
10
14
11
15
# Use the new container infrastructure
12
16
sudo : false
@@ -16,10 +20,13 @@ addons:
16
20
apt :
17
21
packages :
18
22
- python-pip
23
+ - python-setuptools
24
+ - python3-pip
25
+ - python3-setuptools
19
26
20
27
install :
21
28
# Install ansible and dependencies
22
- - if [ "$ANSIBLE_VERSION" = "latest" ]; then pip install ansible ansible-lint --upgrade; else pip install ansible=="$ANSIBLE_VERSION" ansible-lint --upgrade; fi
29
+ - PIP=$(which pip3 || which pip); if [ "$ANSIBLE_VERSION" = "latest" ]; then "$PIP" install ansible ansible-lint --upgrade; else "$PIP" install ansible=="$ANSIBLE_VERSION" ansible-lint --upgrade; fi
23
30
24
31
# Check ansible version
25
32
- ansible --version
Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ block of the maven settings.
182
182
183
183
When set the given version of Ansible will be installed on the controlhost.
184
184
185
+ controlhost_python_version: 3
186
+
187
+ Controls if Python3 or Python2 will be installed. The exact version depends on the host's OS.
188
+
185
189
controlhost_packages_pip_upgrade: true
186
190
187
191
Controls if pip will be executed using the --upgrade option.
Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ controlhost_maven_mirrors: []
93
93
# When set the given version of Ansible will be installed on the controlhost
94
94
# controlhost_ansible_version: 2.5.6
95
95
96
+ # Use either 2 for Python2 or 3 for Python3 here
97
+ controlhost_python_version : 3
98
+
96
99
# Controls if pip will be executed using the --upgrade option
97
100
controlhost_packages_pip_upgrade : true
98
101
Original file line number Diff line number Diff line change @@ -5,15 +5,17 @@ galaxy_info:
5
5
company : pro!vision
6
6
issue_tracker_url : https://wcm-io.atlassian.net
7
7
license : Apache
8
- min_ansible_version : 2.4
8
+ min_ansible_version : 2.5
9
9
10
10
platforms :
11
11
- name : EL
12
12
versions :
13
13
- 7
14
+ - 8
14
15
- name : Debian
15
16
versions :
16
17
- stretch
18
+ - buster
17
19
18
20
galaxy_tags :
19
21
- aem
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ __controlhost_packages_os:
3
3
- iftop
4
4
- htop
5
5
- iotop
6
- - python2.7
7
- - python-pip
6
+ - " {{ ' python2.7' if controlhost_python_version == '2' else 'python3' }} "
7
+ - " {{ ' python-pip' if controlhost_python_version == '2' else 'python3-pip' }} "
8
8
- git
9
9
- sshpass
10
10
- wget
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ __controlhost_packages_os:
3
3
- iftop
4
4
- htop
5
5
- iotop
6
- - python
7
- - python2 -pip
6
+ - " {{ ' python' if controlhost_python_version == '2' else 'python3' }} "
7
+ - " {{ 'python -pip' if controlhost_python_version == '2' else 'python3-pip' }} "
8
8
- git
9
9
- sshpass
10
10
- wget
You can’t perform that action at this time.
0 commit comments