zuul-jobs/roles/configure-mirrors/tasks/mirror.yaml
Albin Vass d01b4e1339 configure-mirrors: update include to include_tasks
Change-Id: I77ee216150e497b0b45f34c8778b45d89f63b20e
2020-05-26 10:12:12 +02:00

35 lines
1.0 KiB
YAML

- name: Remove .pydistutils.cfg configuration in homedir
file:
path: ~/.pydistutils.cfg
state: absent
- name: Include OS-specific variables
include_vars: "{{ zj_distro_os }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "{{ ansible_distribution }}.{{ ansible_architecture }}.yaml"
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
loop_control:
loop_var: zj_distro_os
- 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_tasks: "{{ zj_distro_os }}"
with_first_found:
- "mirror/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
- "mirror/{{ ansible_distribution }}.yaml"
- "mirror/{{ ansible_os_family }}.yaml"
- "mirror/default.yaml"
loop_control:
loop_var: zj_distro_os