Create pip.conf from a template, handle proxy network

This commit is contained in:
Kenneth Benzie 2024-04-09 19:08:55 +01:00
parent a8f255b715
commit 9bf8c46bb9
2 changed files with 17 additions and 2 deletions

View File

@ -28,7 +28,14 @@
dest: ~/.pylintrc
- src: ~/.config/python/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
- name: install pip packages

View 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