Skip to content

Commit 2aff3a7

Browse files
committed
get-pip w/ ansible
1 parent 999715c commit 2aff3a7

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

bin/ansible-install-pip.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env sh
2+
3+
PYTHON=python
4+
USER=--user
5+
6+
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
7+
sudo ${PYTHON} get-pip.py ${USER}
8+
rm get-pip.py
9+
pip install ${USER} ansible

roles/pip/tasks/main.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
- name: Copy create PIP shell script
2-
template:
3-
src: "python-pip-install.sh"
4-
dest: /tmp
5-
mode: u=x
1+
- name: Download get-pip
2+
get_url:
3+
url: https://bootstrap.pypa.io/get-pip.py
4+
dest: /tmp/get-pip.py
5+
mode: '0500'
66

7-
- name: Create PIP.
8-
shell: /tmp/python-pip-install.sh
7+
- name: Execute get-pip
8+
command: "{{ python }} /tmp/get-pip.py"
9+
10+
- name: Remove downloaded get-pip
11+
file:
12+
path: /tmp/get-pip.py
13+
state: absent

roles/pip/templates/python-pip-install.sh

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

0 commit comments

Comments
 (0)