-
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.
Merge pull request #25 from gforcada/overhaul-venvs
Overhaul venvs
- Loading branch information
Showing
6 changed files
with
124 additions
and
58 deletions.
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,27 @@ | ||
--- | ||
## | ||
# role main options | ||
## | ||
|
||
python_24: false | ||
python_26: false | ||
python_27: false | ||
python_31: false | ||
python_32: false | ||
python_33: false | ||
python_34: false | ||
python_35: false | ||
python_36: false | ||
python_37: false | ||
python_38: false | ||
python_39: false | ||
python_310: false | ||
python_311: false | ||
python_312: true | ||
python_313: false | ||
|
||
pillow: false | ||
lxml: false | ||
|
||
# fine grained settings | ||
base_install_folder: "/srv" |
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
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,49 @@ | ||
--- | ||
## | ||
# Virtual environment related configuration | ||
# | ||
# !! Note that Python 2.7 is installed slightly different | ||
## | ||
|
||
pkg_url: "https://files.pythonhosted.org/packages" | ||
|
||
venv_versions: | ||
py24: "1.7.2" | ||
py26: "1.10" | ||
py27: "20.15.1" | ||
|
||
venv_url_hashes: | ||
py24: "7b88d35d0a353ec70e42aa37fd8b0bd1c643419c80f022ffaafa4d6449f0" | ||
py26: "f425e456e017af4801bb08920e30c149a44ac0c194f2225bdb712e77701c" | ||
py27: "df7c7b1b7a5ac4e41fac24c3682c1cc32f2c1d683d308bba2500338d1e3e" | ||
|
||
venv_file_hashes: | ||
py24: "b5d63b05373a4344ae099a68875aae78" | ||
py26: "9745c28256c70c76d36adb3767a00212" | ||
py27: "e9a76a95dc28cf9b55cfc87bd4eef20c" | ||
|
||
venv27_wheel_name: "virtualenv-{{ venv_versions.py27 }}-py2.py3-none-any.whl" | ||
|
||
## | ||
# main venvs configuration, based on the variables above | ||
## | ||
|
||
venv24: | ||
version: "{{ venv_versions.py24 }}" | ||
url: "{{ pkg_url }}/16/86/{{ venv_url_hashes.py24 }}/virtualenv-1.7.2.tar.gz" | ||
md5: "{{ venv_file_hashes.py24 }}" | ||
tar_file: "/tmp/virtualenv-{{ venv_versions.py24 }}.tar.gz" | ||
sources: "/tmp/virtualenv-{{ venv_versions.py24 }}" | ||
|
||
venv26: | ||
version: "{{ venv_versions.py26 }}" | ||
url: "{{ pkg_url }}/d5/5b/{{ venv_url_hashes.py26 }}/virtualenv-1.10.tar.gz" | ||
md5: "{{ venv_file_hashes.py26 }}" | ||
tar_file: "/tmp/virtualenv-{{ venv_versions.py26 }}.tar.gz" | ||
sources: "/tmp/virtualenv-{{ venv_versions.py26 }}" | ||
|
||
venv27: | ||
version: "{{ venv_versions.py27 }}" | ||
url: "{{ pkg_url }}/6f/43/{{ venv_url_hashes.py27 }}/{{ venv27_wheel_name }}" | ||
md5: "{{ venv_file_hashes.py27 }}" | ||
wheel_file: "/tmp/{{ venv27_wheel_name }}" |
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
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