zuul-jobs/roles/configure-mirrors/tasks/mirror.yaml
David Moreau-Simard d45cfa287d Streamline configure-mirrors and Ubuntu repository setup
- Improve the structure to support multiple distributions
- Use one task to set up the different repository files
- Use handler to update the apt cache

Change-Id: I90933164cbca9d230cebeb3e2e1263c7806db840
2017-09-07 15:37:31 -04:00

30 lines
727 B
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: Install .pydistutils.cfg configuration in homedir
template:
dest: ~/.pydistutils.cfg
mode: 0644
src: .pydistutils.cfg.j2
- name: Include OS-specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}.yaml"
- "{{ ansible_os_family }}.yaml"
- "default.yaml"
- name: Setup distribution specific packaging mirrors
include: "{{ item }}"
static: no
with_first_found:
- "mirror/{{ ansible_distribution }}.yaml"
- "mirror/{{ ansible_os_family }}.yaml"
- "mirror/default.yaml"