This repository was archived by the owner on Jun 8, 2022. It is now read-only.
File tree 8 files changed +26
-13
lines changed
8 files changed +26
-13
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ script:
22
22
&& (echo 'Idempotence test: pass' && exit 0)
23
23
|| (echo 'Idempotence test: fail' && exit 1)
24
24
- stat /usr/local/pythonz/pythons/CPython-3.6.2/bin/python
25
+ - stat /usr/local/pythonz/pythons/CPython-3.6.3/bin/python
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ pyslackers.python
3
3
4
4
[ ![ Build Status] ( https://travis-ci.org/pyslackers/ansible-role-python.svg?branch=master )] ( https://travis-ci.org/pyslackers/ansible-role-python )
5
5
6
- Python role for ansible. This supports multiple python versions thanks to pythonz.
6
+ Python3 role for ansible. This supports multiple python versions thanks to pythonz.
7
7
8
8
Requirements
9
9
------------
13
13
Role Variables
14
14
--------------
15
15
16
- * ` version ` : The python version, this must be a valid value in the python ftp site .
16
+ * ` python_versions ` : List of valid python 3 versions to install .
17
17
18
18
Dependencies
19
19
------------
@@ -25,7 +25,9 @@ Example Playbook
25
25
26
26
``` yml
27
27
- role : pyslackers.python
28
- version : " 3.6.2"
28
+ python_versions :
29
+ - " 3.6.2"
30
+ - " 3.6.3"
29
31
` ` `
30
32
31
33
License
Original file line number Diff line number Diff line change 1
1
---
2
- version : " 3.6.2"
2
+ python_versions :
3
+ - " 3.6.3"
Original file line number Diff line number Diff line change 1
1
---
2
2
- import_tasks : pythonz.yml
3
- - import_tasks : python.yml
3
+ - include_tasks : python.yml
4
+ with_items : " {{ python_versions }}"
5
+ loop_control :
6
+ loop_var : python_version
Original file line number Diff line number Diff line change 1
1
---
2
- - name : " Install python {{ version }}"
3
- command : " /usr/local/pythonz/bin/pythonz install {{ version }}"
2
+ - name : " Install python {{ python_version }}"
3
+ command : " /usr/local/pythonz/bin/pythonz install {{ python_version }}"
4
4
args :
5
- creates : " /usr/local/pythonz/pythons/CPython-{{ version }}/bin/python"
5
+ creates : " /usr/local/pythonz/pythons/CPython-{{ python_version }}/bin/python"
6
6
7
- - name : " Install virtualenv for python {{ version }}"
7
+ - name : " Update pip & setuptools for python {{ python_version }}"
8
8
pip :
9
- executable : " /usr/local/pythonz/pythons/CPython-{{ version }}/bin/pip3"
10
- name : virtualenv
9
+ executable : " /usr/local/pythonz/pythons/CPython-{{ python_version }}/bin/pip3"
10
+ name : " {{ item }} "
11
11
state : latest
12
+ with_items :
13
+ - pip
14
+ - setuptools
Original file line number Diff line number Diff line change 24
24
force : no
25
25
repo : https://github.com/saghul/pythonz.git
26
26
dest : /usr/src/pythonz
27
- version : c3fcfa8876eda7fcafe55ae244d6884a4d540aeb
27
+ version : master
28
28
register : new_pythonz_release
29
29
30
30
- name : Install pythonz
Original file line number Diff line number Diff line change 1
1
localhost
2
-
Original file line number Diff line number Diff line change 1
1
---
2
2
- hosts : localhost
3
+ vars :
4
+ python_versions :
5
+ - " 3.6.3"
6
+ - " 3.6.2"
3
7
roles :
4
8
- ansible-role-python
You can’t perform that action at this time.
0 commit comments