e79ca5ec3a
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
32 lines
932 B
YAML
32 lines
932 B
YAML
- name: Remove .pydistutils.cfg configuration in homedir
|
|
file:
|
|
path: ~/.pydistutils.cfg
|
|
state: absent
|
|
|
|
- name: Include OS-specific variables
|
|
include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
|
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml"
|
|
- "{{ ansible_distribution }}.yaml"
|
|
- "{{ ansible_os_family }}.yaml"
|
|
- "default.yaml"
|
|
|
|
- name: Install /etc/pip.conf configuration
|
|
become: yes
|
|
template:
|
|
dest: /etc/pip.conf
|
|
group: root
|
|
mode: 0644
|
|
owner: root
|
|
src: etc/pip.conf.j2
|
|
|
|
- name: Setup distribution specific packaging mirrors
|
|
include: "{{ item }}"
|
|
static: no
|
|
with_first_found:
|
|
- "mirror/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
|
- "mirror/{{ ansible_distribution }}.yaml"
|
|
- "mirror/{{ ansible_os_family }}.yaml"
|
|
- "mirror/default.yaml"
|