Skip to content

Commit 761e3bf

Browse files
committed
refactoring extraneous logic and install venv consistently
1 parent b04926d commit 761e3bf

File tree

8 files changed

+6
-17
lines changed

8 files changed

+6
-17
lines changed

defaults/main.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
---
2-
32
python_prefix_dir: "/usr/local"
4-
python_binary: "{{python_prefix_dir}}/bin/python"
5-
6-
python_pip_location: "{{python_prefix_dir}}/bin/pip"
3+
python_pip_location: "{{python_prefix_dir}}/bin/pip"
74
python_virtualenv_location: "{{python_prefix_dir}}/bin/virtualenv"
85
# python_setuptools_version: # default to latest
9-
# python_virtualenv_version: # default to latest
10-
11-
python_source_url: "http://www.python.org/ftp/python"
12-
python_source_version: "2.7.6"
13-
python_source_configure_options: "--prefix={{python_prefix_dir}}"
146

157
get_pip_url: "https://bootstrap.pypa.io/get-pip.py"
168

tasks/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@
55
- include_tasks: "package.yml"
66

77
- include_tasks: "pip.yml"
8-
9-
- include_tasks: "virtualenv.yml"

tasks/package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
apt_repository:
44
repo: "ppa:deadsnakes/ppa"
55
mode: "0644"
6+
when: python_versions|length > 0
67

78
- name: "Make sure the packages are installed"
89
apt:

tasks/virtualenv.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

vars/debian-10.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python_packages_add:
44
- "python3-dev"
55
- "python3-venv"
66
- "python3-distutils"
7+
- "virtualenv"
78

89
python_packages_remove:
910
- "python2.7"

vars/debian-11.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python_packages_add:
44
- "python3-dev"
55
- "python3-venv"
66
- "python3-distutils"
7+
- "virtualenv"
78

89
python_packages_remove:
910
- "python2.7"

vars/ubuntu-18.04.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python_packages_add:
44
- "python3-dev"
55
- "python3-setuptools"
66
- "python3-venv"
7+
- "virtualenv"
78

89
python_packages_remove:
910
- "python2.7"

vars/ubuntu-20.04.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ python_packages_add:
33
- "python3"
44
- "python3-dev"
55
- "python3-venv"
6+
- "virtualenv"
67

78
python_packages_remove:
89
- "python2.7"

0 commit comments

Comments
 (0)