Stop installing pydistutils.cfg

We install pydistutils.cfg to catch legacy cases where people
are doing things with easy_install. That code path is not
desirable and increasingly broken, as support for things like
allow-hosts is dropped upstream.

Stop installing the file. This will mean people using easy_install
won't get the benefit of the mirrors, but they shouldn't be
using easy_install anyway.

Remove pydistutils.cfg if it's there

Make sure we don't have any pydistutils.cfg around.

Change-Id: I24a05f456f87bd4cb57ebf89d4245477bf675f97
This commit is contained in:
Monty Taylor 2019-11-24 11:06:08 -05:00
parent 68ea061fb2
commit e79ca5ec3a
2 changed files with 4 additions and 9 deletions

View File

@ -1,8 +1,7 @@
- name: Install .pydistutils.cfg configuration in homedir
template:
dest: ~/.pydistutils.cfg
mode: 0644
src: .pydistutils.cfg.j2
- name: Remove .pydistutils.cfg configuration in homedir
file:
path: ~/.pydistutils.cfg
state: absent
- name: Include OS-specific variables
include_vars: "{{ item }}"

View File

@ -1,4 +0,0 @@
# {{ ansible_managed }}
[easy_install]
index_url = {{ pypi_mirror }}
allow_hosts = {{ mirror_fqdn }}