From 2e684a8da5004898a45e6a39f4c8f02878041d6c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 15 Oct 2019 16:01:27 +1100 Subject: [PATCH] configure-mirrors: add CentOS 8 Add repositories for CentOS 8, add base test. Co-Authored-By: Sorin Sbarnea Change-Id: I24e194a2f4729046c8f521ffccd3b00055127516 --- .../tasks/mirror/CentOS-8.yaml | 28 +++++++++++++++++++ .../etc/yum.repos.d/CentOS-AppStream.repo.j2 | 7 +++++ .../etc/yum.repos.d/CentOS-Base.repo.j2 | 7 +++++ .../etc/yum.repos.d/CentOS-Extras.repo.j2 | 7 +++++ .../etc/yum.repos.d/CentOS-PowerTools.repo.j2 | 7 +++++ .../centos8/etc/yum.repos.d/epel.repo.j2 | 21 ++++++++++++++ zuul-tests.d/general-roles-jobs.yaml | 11 ++++++++ 7 files changed, 88 insertions(+) create mode 100644 roles/configure-mirrors/tasks/mirror/CentOS-8.yaml create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-AppStream.repo.j2 create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Base.repo.j2 create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Extras.repo.j2 create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-PowerTools.repo.j2 create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/epel.repo.j2 diff --git a/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml b/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml new file mode 100644 index 000000000..8e6489789 --- /dev/null +++ b/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml @@ -0,0 +1,28 @@ +- name: Install CentOS 8 repository files + become: yes + template: + dest: "/{{ item }}" + group: root + mode: 0644 + owner: root + src: "centos8/{{ item }}.j2" + with_items: + - etc/yum.repos.d/CentOS-AppStream.repo + - etc/yum.repos.d/CentOS-Base.repo + - etc/yum.repos.d/CentOS-Extras.repo + - etc/yum.repos.d/CentOS-PowerTools.repo + - etc/yum.repos.d/epel.repo + notify: + - Update dnf cache + +# http://dnf.readthedocs.io/en/latest/conf_ref.html#options-for-both-main-and-repo +# deltarpm is useful when the bottleneck is the network throughput. +# It also requires additional drpm packages to be hosted by the mirrors which +# is not done by default. +- name: Disable deltrarpm + become: yes + ini_file: + path: /etc/dnf.conf + section: main + option: deltarpm + value: 0 diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-AppStream.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-AppStream.repo.j2 new file mode 100644 index 000000000..5941b4b27 --- /dev/null +++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-AppStream.repo.j2 @@ -0,0 +1,7 @@ +# {{ ansible_managed }} +[AppStream] +name=CentOS-$releasever - AppStream +baseurl={{ package_mirror }}/$releasever/AppStream/$basearch/os/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial \ No newline at end of file diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Base.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Base.repo.j2 new file mode 100644 index 000000000..1437657b9 --- /dev/null +++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Base.repo.j2 @@ -0,0 +1,7 @@ +# {{ ansible_managed }} +[BaseOS] +name=CentOS-$releasever - Base +baseurl={{ package_mirror }}/$releasever/BaseOS/$basearch/os/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Extras.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Extras.repo.j2 new file mode 100644 index 000000000..226f967fb --- /dev/null +++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-Extras.repo.j2 @@ -0,0 +1,7 @@ +# {{ ansible_managed }} +[extras] +name=CentOS-$releasever - Extras +baseurl={{ package_mirror }}/$releasever/extras/$basearch/os/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-PowerTools.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-PowerTools.repo.j2 new file mode 100644 index 000000000..b3a2c1b96 --- /dev/null +++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-PowerTools.repo.j2 @@ -0,0 +1,7 @@ +# {{ ansible_managed }} +[PowerTools] +name=CentOS-$releasever - PowerTools +baseurl={{ package_mirror }}/$releasever/PowerTools/$basearch/os/ +gpgcheck=1 +enabled=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/epel.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/epel.repo.j2 new file mode 100644 index 000000000..ecf206417 --- /dev/null +++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/epel.repo.j2 @@ -0,0 +1,21 @@ +# {{ ansible_managed }} +[epel] +name=Extra Packages for Enterprise Linux 8 - $basearch +baseurl={{ epel_mirror }}/8/Everything/$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 8 - $basearch - Debug +baseurl={{ epel_mirror }}/8/Everything/$basearch/debug +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-source] +name=Extra Packages for Enterprise Linux 8 - $basearch - Source +baseurl={{ epel_mirror }}/8/Everything/SRPMS +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 diff --git a/zuul-tests.d/general-roles-jobs.yaml b/zuul-tests.d/general-roles-jobs.yaml index 6c5bd9bf0..ec7fb0ecf 100644 --- a/zuul-tests.d/general-roles-jobs.yaml +++ b/zuul-tests.d/general-roles-jobs.yaml @@ -133,6 +133,16 @@ - name: centos-7 label: centos-7 +- job: + name: zuul-jobs-test-base-roles-centos-8 + description: Tests roles in the 'base' job on centos-8 + parent: zuul-jobs-test-base-roles + tags: auto-generated + nodeset: + nodes: + - name: centos-8 + label: centos-8 + - job: name: zuul-jobs-test-base-roles-debian-stretch description: Tests roles in the 'base' job on debian-stretch @@ -464,6 +474,7 @@ - zuul-jobs-test-add-gpgkey - zuul-jobs-test-add-sshkey - zuul-jobs-test-base-roles-centos-7 + - zuul-jobs-test-base-roles-centos-8 - zuul-jobs-test-base-roles-debian-stretch - zuul-jobs-test-base-roles-fedora-29 - zuul-jobs-test-base-roles-gentoo-17-0-systemd