Create pip.conf from a template, handle proxy network
This commit is contained in:
parent
a8f255b715
commit
9bf8c46bb9
@ -28,7 +28,14 @@
|
|||||||
dest: ~/.pylintrc
|
dest: ~/.pylintrc
|
||||||
- src: ~/.config/python/ipython_config.py
|
- src: ~/.config/python/ipython_config.py
|
||||||
dest: ~/.config/ipython/profile_default/ipython_config.py
|
dest: ~/.config/ipython/profile_default/ipython_config.py
|
||||||
- src: ~/.config/python/pip.conf
|
|
||||||
|
# TODO: remove this symbolic link if it exists, don't remove a regular file
|
||||||
|
# - src: ~/.config/python/pip.conf
|
||||||
|
# dest: ~/.config/pip/pip.conf
|
||||||
|
|
||||||
|
- name: create pip.conf from template
|
||||||
|
template:
|
||||||
|
src: pip.conf.j2
|
||||||
dest: ~/.config/pip/pip.conf
|
dest: ~/.config/pip/pip.conf
|
||||||
|
|
||||||
- name: install pip packages
|
- name: install pip packages
|
||||||
|
8
roles/python/templates/pip.conf.j2
Normal file
8
roles/python/templates/pip.conf.j2
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[global]
|
||||||
|
break-system-packages = true
|
||||||
|
{% if ansible_env.http_proxy is defined %}
|
||||||
|
proxy = {{ ansible_env.http_proxy }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
[list]
|
||||||
|
format=columns
|
Loading…
x
Reference in New Issue
Block a user