-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(venvs): split python 2.7 venv creation
Install `virtualenv` with `pip` to ensure it works.
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
|
||
- name: "Virtualenv | Check if it is already installed | {{ py_data.version }}" | ||
become: true | ||
ansible.builtin.stat: | ||
path: "{{ py_data.install }}/bin/virtualenv" | ||
register: already_installed | ||
ignore_errors: true | ||
|
||
- name: "Virtualenv | Download | {{ py_data.version }}" | ||
ansible.builtin.get_url: | ||
url: "{{ venv_data.url }}" | ||
dest: "{{ venv_data.wheel_file }}" | ||
checksum: "md5:{{ venv_data.md5 }}" | ||
mode: "0440" | ||
when: not already_installed.stat.exists | ||
|
||
- name: "Virtualenv | Download | pip" | ||
ansible.builtin.get_url: | ||
url: "https://bootstrap.pypa.io/pip/2.7/get-pip.py" | ||
dest: "/tmp/get-pip.py" | ||
checksum: "md5:60e8267eb1b7bc71dc4843eb7bd294d3" | ||
mode: "0440" | ||
when: not already_installed.stat.exists | ||
|
||
- name: "Virtualenv | Install | pip" | ||
ansible.builtin.command: "{{ item }}" | ||
args: | ||
creates: "{{ py_data.install }}/bin/pip" | ||
with_items: | ||
- "{{ py_data.install }}/bin/python /tmp/get-pip.py" | ||
when: not already_installed.stat.exists | ||
|
||
- name: " Virtualenv | Install | {{ py_data.version }}" | ||
become: true | ||
ansible.builtin.command: "{{ item }}" | ||
args: | ||
creates: "{{ py_data.install }}/bin/virtualenv" | ||
with_items: | ||
- "{{ py_data.install }}/bin/pip install {{ venv_data.wheel_file }}" | ||
when: not already_installed.stat.exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters