-
Notifications
You must be signed in to change notification settings - Fork 1k
/
install_pip.yml
41 lines (32 loc) · 1 KB
/
install_pip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
- name: download get_pip.py
raw: cd $HOME && https_proxy="{{ lookup('env', 'https_proxy') }}" wget {{pip_url}}
- name: run get-pip.py
raw: "{{pypy_binary_directory}}/python $HOME/get-pip.py --proxy='{{ lookup('env', 'https_proxy') }}'"
- name: create local temp directory
local_action:
module: raw
mkdir -p {{local_temp_directory}}
become: no
- name: prepare install_pip.sh
local_action:
module: template
src: install_pip.sh.j2
dest: "{{local_temp_directory}}/install_pip.sh"
become: no
- name: run pip.sh
script: "{{local_temp_directory}}/install_pip.sh"
- name: add execute permission
raw: chmod a+x {{pypy_directory}}/pip
- name: create pypy_directory
raw: mkdir -p {{pypy_binary_directory}}
- name: move python to binary directory
raw: mv {{pypy_directory}}/pip {{pypy_binary_directory}}/pip
- name: create .pip
raw: touch $HOME/.pip
- name: remove pip.sh
local_action:
module: file
path: "{{local_temp_directory}}/pip.sh"
state: absent
become: no