diskimage-builder/roles/dib-setup-gate-mirrors/tasks/main.yaml
Xinliang Liu a6ee4d0c21 Introduce openEuler distro
Add openeuler-minimal element and add CI functional tests for both
x86_64 and arm64.

OpenEuler is an open source community driven YUM/DNF distro like
Fedora. It references Fedora and CentOS a lot for the rpm packages
building. So somewhat it can be treated as a redhat family distro
and reuse the YUM/DNF related elements to help build openEuler images.

For more info about openEuler, see: https://openeuler.org/en

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/803413
Change-Id: I3e06e49b524364c3a4edeba8bce7a8c06b9c7b76
2021-08-04 03:06:55 +00:00

76 lines
2.2 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' ]
- name: Create openeuler-minimal 20.03-LTS-SP2 directory
file:
path: "{{ dib_gate_mirror_repos }}/openeuler-minimal/20.03-LTS-SP2/yum.repos.d"
state: directory
mode: 0775
recurse: yes
- name: Install openeuler-minimal 20.03-LTS-SP2 repo files
template:
dest: "{{ dib_gate_mirror_repos }}/openeuler-minimal/20.03-LTS-SP2/yum.repos.d/dib-mirror-{{ item }}"
mode: 0644
src: "openeuler-minimal/20.03-LTS-SP2/{{ item }}.j2"
with_items:
- openEuler.repo