diskimage-builder/roles/dib-setup-gate-mirrors/tasks/main.yaml
Ian Wienand 3bc89edd32 yum-minimal : update mirrors for Centos 8
The repo format has slightly changed for CentOS 8 (s/os/baseos/).

Make the chroot builder look for a more specific repos.d directory
first named for the distro variable, then fall back to to top-level
dir (this avoids having to constantly change fedora).

Update the gate mirror setup and roles for new Centos 8 paths too.

Change-Id: I5b7f0c3624cac1d7aa7ed8bf6286b85d808b9c9a
2019-10-03 00:22:05 +00:00

60 lines
1.7 KiB
YAML

- name: Set repo path
set_fact:
dib_gate_mirror_repos: "{{ ansible_user_dir }}/dib-mirror"
- debug: msg="zuul site mirror {{ zuul_site_mirror_fqdn }}"
- debug: msg="mirror_fqdn {{ mirror_fqdn }}"
- name: Create centos-minimal 7 directory
file:
path: "{{ dib_gate_mirror_repos }}/centos-minimal/7/yum.repos.d"
state: directory
mode: 0775
recurse: yes
- name: Install centos-minimal 7 repo files
template:
dest: "{{ dib_gate_mirror_repos }}/centos-minimal/7/yum.repos.d/dib-mirror-{{ item }}"
mode: 0644
src: "centos-minimal/7/{{ item }}.j2"
with_items:
- base.repo
- updates.repo
- extras.repo
- name: Create centos-minimal 8 directory
file:
path: "{{ dib_gate_mirror_repos }}/centos-minimal/8/yum.repos.d"
state: directory
mode: 0775
recurse: yes
- name: Install centos-minimal 8 repo files
template:
dest: "{{ dib_gate_mirror_repos }}/centos-minimal/8/yum.repos.d/dib-mirror-{{ item }}"
mode: 0644
src: "centos-minimal/8/{{ item }}.j2"
with_items:
- base.repo
- appstream.repo
- extras.repo
- name: Create fedora-minimal directories
file:
path: "{{ dib_gate_mirror_repos }}/fedora-minimal/{{ item }}/yum.repos.d"
state: directory
mode: 0775
recurse: yes
# sometimes Fedora moves things and we need different versions; keep
# the loops for future use.
with_items:
- default
- name: Install fedora-minimal repo files
template:
dest: "{{ dib_gate_mirror_repos }}/fedora-minimal/{{ item[0] }}/yum.repos.d/dib-mirror-{{ item[1] }}"
mode: 0644
src: "fedora-minimal/{{ item[0] }}/{{ item[1] }}.j2"
with_nested:
- [ 'default' ]
- [ 'fedora.repo', 'fedora-updates.repo' ]