Add support for centos in configure-mirrors

Change-Id: Ia62c60fb9bd7e8e19d9349fa9675aa379b872924
This commit is contained in:
David Moreau-Simard 2017-09-06 22:35:42 -04:00 committed by David Moreau Simard
parent d45cfa287d
commit 8ac328ec21
6 changed files with 83 additions and 0 deletions

View File

@ -3,3 +3,10 @@
- name: Update apt cache
become: yes
command: apt-get update
- name: Update yum cache
become: yes
command: "{{ item }}"
with_items:
- yum clean all
- yum makecache

View File

@ -0,0 +1,13 @@
- name: Install CentOS repository files
become: yes
template:
dest: "/{{ item }}"
group: root
mode: 0644
owner: root
src: "{{ item }}.j2"
with_items:
- etc/yum.repos.d/CentOS-Base.repo
- etc/yum.repos.d/epel.repo
notify:
- Update yum cache

View File

@ -0,0 +1,28 @@
# {{ ansible_managed }}
[base]
name=CentOS-$releasever - Base
baseurl={{ package_mirror }}/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl={{ package_mirror }}/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl={{ package_mirror }}/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl={{ package_mirror }}/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

View File

@ -0,0 +1,24 @@
# {{ ansible_managed }}
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl={{ epel_mirror }}/7/$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl={{ epel_mirror }}/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl={{ epel_mirror }}/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

View File

@ -0,0 +1,2 @@
package_mirror: "http://{{ mirror_fqdn }}/{{ ansible_distribution | lower }}"
epel_mirror: "http://{{ mirror_fqdn }}/epel"

View File

@ -160,6 +160,13 @@
- zuul: openstack-infra/project-config
run: playbooks/integration-tests/base
- job:
name: base-integration-centos-7
parent: base-integration
nodes:
- name: centos-7
label: centos-7
- job:
name: base-integration-ubuntu-trusty
parent: base-integration
@ -178,9 +185,11 @@
name: openstack-infra/zuul-jobs
check:
jobs:
- base-integration-centos-7
- base-integration-ubuntu-trusty
- base-integration-ubuntu-xenial
gate:
jobs:
- base-integration-centos-7
- base-integration-ubuntu-trusty
- base-integration-ubuntu-xenial