File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ python_apt_repo: ''
6
6
python_global_packages : []
7
7
python_package_name : python
8
8
9
+ # Example pip configuration
10
+ # python_pip_config:
11
+ # global:
12
+ # index-url: http://pypi.example.com/simple
13
+ # find-links:
14
+ # - http://pypi2.example.com/simple
15
+ # - http://pypi3.example.com/simple
16
+ # search:
17
+ # index: http://pypi.example.com/simple
18
+
9
19
# Build defaults
10
20
python_build_from_source : false
11
21
python_configure_prefix : ' /usr/local'
Original file line number Diff line number Diff line change 25
25
- name : Upgrade pip
26
26
pip : name=pip state=latest executable="{{python_pip_path}}"
27
27
28
+ - name : Add system pip.conf
29
+ template :
30
+ src : pip.conf.j2
31
+ dest : /etc/pip.conf
32
+ owner : root
33
+ group : root
34
+ mode : 0644
35
+ when : python_pip_config is defined
36
+
28
37
# Install packages
29
38
- name : Install/upgrade virtualenv
30
39
pip : name=virtualenv state=latest executable="{{python_pip_path}}"
Original file line number Diff line number Diff line change
1
+ {% for section ,config in python_pip_config .iteritems () | sort %}
2
+ [{{section}}]
3
+ {% for k ,v in config .iteritems () | sort %}
4
+ {% if v is iterable and v is not string %}
5
+ {{k}} =
6
+ {% for item in v %}
7
+ {{item}}
8
+ {% endfor %}
9
+ {% else %}
10
+ {{k}} = {{v}}
11
+ {% endif %}
12
+ {% endfor %}
13
+ {% endfor %}
You can’t perform that action at this time.
0 commit comments