Add support for fedora in configure-mirrors

Change-Id: I05d87e2a846c2b72eee80e06eeceeb1f92e39f42
This commit is contained in:
David Moreau-Simard 2017-09-06 22:43:01 -04:00 committed by David Moreau Simard
parent b2ccb986a9
commit a3fd046cc8
6 changed files with 102 additions and 0 deletions

View File

@ -4,6 +4,13 @@
become: yes
command: apt-get update
- name: Update dnf cache
become: yes
command: "{{ item }}"
with_items:
- dnf clean all
- dnf makecache
- name: Update yum cache
become: yes
command: "{{ item }}"

View File

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

View File

@ -0,0 +1,36 @@
# {{ ansible_managed }}
[updates]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
baseurl={{ package_mirror }}/updates/$releasever/$basearch/
enabled=1
repo_gpgcheck=0
type=rpm
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
[updates-debuginfo]
name=Fedora $releasever - $basearch - Updates - Debug
failovermethod=priority
baseurl={{ package_mirror }}/updates/$releasever/$basearch/debug/
enabled=0
repo_gpgcheck=0
type=rpm
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
[updates-source]
name=Fedora $releasever - Updates Source
failovermethod=priority
baseurl={{ package_mirror }}/updates/$releasever/SRPMS/
enabled=0
repo_gpgcheck=0
type=rpm
gpgcheck=1
metadata_expire=6h
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

View File

@ -0,0 +1,36 @@
# {{ ansible_managed }}
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
baseurl={{ package_mirror }}/releases/$releasever/Everything/$basearch/os/
enabled=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
baseurl={{ package_mirror }}/releases/$releasever/Everything/$basearch/debug/tree/
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
baseurl={{ package_mirror }}/releases/$releasever/Everything/source/tree/
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False

View File

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

View File

@ -174,6 +174,13 @@
- name: debian-jessie
label: debian-jessie
- job:
name: base-integration-fedora-26
parent: base-integration
nodes:
- name: fedora-26
label: fedora-26
- job:
name: base-integration-ubuntu-trusty
parent: base-integration
@ -194,11 +201,13 @@
jobs:
- base-integration-centos-7
- base-integration-debian-jessie
- base-integration-fedora-26
- base-integration-ubuntu-trusty
- base-integration-ubuntu-xenial
gate:
jobs:
- base-integration-centos-7
- base-integration-debian-jessie
- base-integration-fedora-26
- base-integration-ubuntu-trusty
- base-integration-ubuntu-xenial