File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+
3
+ - name : " Virtualenv | Check if it is already installed | {{ py_data.version }}"
4
+ become : true
5
+ ansible.builtin.stat :
6
+ path : " {{ py_data.install }}/bin/virtualenv"
7
+ register : already_installed
8
+ ignore_errors : true
9
+
10
+ - name : " Virtualenv | Download | {{ py_data.version }}"
11
+ ansible.builtin.get_url :
12
+ url : " {{ venv_data.url }}"
13
+ dest : " {{ venv_data.wheel_file }}"
14
+ checksum : " md5:{{ venv_data.md5 }}"
15
+ mode : " 0440"
16
+ when : not already_installed.stat.exists
17
+
18
+ - name : " Virtualenv | Download | pip"
19
+ ansible.builtin.get_url :
20
+ url : " https://bootstrap.pypa.io/pip/2.7/get-pip.py"
21
+ dest : " /tmp/get-pip.py"
22
+ checksum : " md5:60e8267eb1b7bc71dc4843eb7bd294d3"
23
+ mode : " 0440"
24
+ when : not already_installed.stat.exists
25
+
26
+ - name : " Virtualenv | Install | pip"
27
+ ansible.builtin.command : " {{ item }}"
28
+ args :
29
+ creates : " {{ py_data.install }}/bin/pip"
30
+ with_items :
31
+ - " {{ py_data.install }}/bin/python /tmp/get-pip.py"
32
+ when : not already_installed.stat.exists
33
+
34
+ - name : " Virtualenv | Install | {{ py_data.version }}"
35
+ become : true
36
+ ansible.builtin.command : " {{ item }}"
37
+ args :
38
+ creates : " {{ py_data.install }}/bin/virtualenv"
39
+ with_items :
40
+ - " {{ py_data.install }}/bin/pip install {{ venv_data.wheel_file }}"
41
+ when : not already_installed.stat.exists
Original file line number Diff line number Diff line change 18
18
19
19
- name : Install Virtualenv for Python 2.7
20
20
ansible.builtin.include_tasks :
21
- file : venv .yml
21
+ file : venv27 .yml
22
22
vars :
23
23
py_data : " {{ py27 }}"
24
24
venv_data : " {{ venv27 }}"
You can’t perform that action at this time.
0 commit comments