Add EL repos to supported by the role

This patch add support and molecule testing for CentOS 9 Stream in addition
to already supported Debian/Ubuntu versions.

Change-Id: Ice095d479bcd8cd9592609329514efe565db6353
This commit is contained in:
Dmitriy Rabotyagov 2024-02-27 19:27:07 +01:00 committed by Dmitriy Rabotyagov
parent acd21441eb
commit 41f2fc7432
6 changed files with 175 additions and 1 deletions

View File

@ -40,6 +40,12 @@
vars:
tox_envlist: molecule-jammy
- job:
name: tox-molecule-stream9
parent: tox-molecule
vars:
tox_envlist: molecule-stream9
- project:
check:
jobs:
@ -48,6 +54,7 @@
- tox-molecule-buster
- tox-molecule-bookworm
- tox-molecule-jammy
- tox-molecule-stream9
gate:
jobs:
- ffrouting-deploy
@ -55,3 +62,4 @@
- tox-molecule-buster
- tox-molecule-bookworm
- tox-molecule-jammy
- tox-molecule-stream9

85
files/gpg/RPM-GPG-KEY-FRR Normal file
View File

@ -0,0 +1,85 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFpYNOkBEADFX24n0TD3myTzqnJcKsV5TT65WfTIdC44AS/jA2aGTdRV/uJK
0pb/KZdelO/+pkNeo4IuxBF3uOUYGLOB1JROJtaNT2Bg0EWwuT4V6mrBrFCGEuUW
6IWN26Sj5f7jynoTMClfZqBdO449kElwumqHfjUNUdsOaaH19euDg11tl7ppJx9u
3gEhzkmaYj0OmGU5uu938VdnFnwybD0BIIqJBdqPyDwQhc/eACnGmI/oOqbZqsnP
ntuNh69YYQ3pVzKQPs7hpCwMopMyW5beB06D2cS7k8V3ceviL+y1rvnQCh5hjARq
QKg8wjfahd2EHLPUwgKyVXIgxq9/bPwlJ60BXehVAgbv71Te5WM1bcZHq/ye/Wd6
8kpSU3Q1JA+qSgyc2sBh7ZB2vA5IGFfrCgZZ/CCG/yhKaNbUwu//OAV8zUfX42Me
yGgEbay8wDUrK1iTwC3xExGP3ESC1tbflnB7mLdjMm1bHJx2xdoM0wGSeWEnFnfv
AYizVaXoE9oom8H/4iYIS+fO8Ted6oiU12W30Bi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007KPoDx4kugjGo
Sur8ZebOkmAxaLVbNlWFCjfNrjqRDQSbC7z1cpLSB4ufrJxg4riEvbyER5aQsCZe
UrFVJw99gjaTrjS/F4cQdaOEwK0qHbQWjPPxPdHy9hPrhrmjYC7Cx5myav4gUeIN
CryktQhft2+GOgDpyrCcwDky2gESSf16I4oIdxYfLlDUtH/WDnnK3RUdsZ7YbxFl
4zsI6NP1DI7yn7Cq9Umjy0UNcz4v7+0jyH3PyV6ZAqAMrdn5/V0Q5drdlr3Ir+s6
BCMPyRP7vDGnYFlPMgkMCR6Ny7SIVfaBeo4NlXIpRb/1poj/MkI8zb/QAN9He1a4
5jJpi89IZX9WZHxQT+/XCV07I8ocvUa5TJxpanSP0GIwLQDbfn+CpPLwmT43k7I=
=jGX0
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -40,7 +40,7 @@
- name: Fail if frr is down
fail:
msg: frr is not up
when: ansible_facts.services['frr'].state != 'running'
when: ansible_facts.services['frr.service'].state != 'running'
- name: Get summary
become: true

39
tasks/frr_install_dnf.yml Normal file
View File

@ -0,0 +1,39 @@
---
# Copyright 2024, Cleura AB.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: If a keyfile is provided, copy the gpg keyfile to the key location
copy:
src: "gpg/{{ key.key | basename }}"
dest: "{{ key.key }}"
mode: '0644'
with_items: "{{ frr_repos_keys }}"
loop_control:
loop_var: key
register: _dnf_apt_keys
until: _dnf_apt_keys is success
retries: 5
delay: 2
- name: Configure repositories
yum_repository:
name: "{{ repo.name }}"
file: "{{ repo.filename }}"
description: "{{ repo.description }}"
baseurl: "{{ repo.baseurl }}"
gpgcheck: "{{ repo.gpgcheck | default('no') }}"
gpgkey: "{{ repo.gpgkey | default(omit) }}"
with_items: "{{ frr_repos }}"
loop_control:
loop_var: repo

View File

@ -80,3 +80,12 @@ commands =
setenv =
{[molecule]setenv}
docker_image_tag=ubuntu-systemd:jammy
[testenv:molecule-stream9]
deps =
{[molecule]deps}
commands =
{[molecule]commands}
setenv =
{[molecule]setenv}
docker_image_tag=centos-systemd:stream9

33
vars/redhat.yml Normal file
View File

@ -0,0 +1,33 @@
---
# Copyright 2024, Cleura AB.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
frr_repos_keys:
- key: /etc/pki/rpm-gpg/RPM-GPG-KEY-FRR
frr_repos:
- name: frr
filename: frr-stable
description: "FRRouting Packages for Enterprise Linux $releasever - $basearch"
baseurl: https://rpm.frrouting.org/repo/el$releasever/frr
gpgkey: "file://{{ frr_repos_keys | map(attribute='key') | join('file://') }}"
- name: frr-extras
filename: frr-stable
description: "FRRouting Dependencies for Enterprise Linux 9 - $basearch"
baseurl: https://rpm.frrouting.org/repo/el$releasever/extras
gpgkey: "file://{{ frr_repos_keys | map(attribute='key') | join('file://') }}"
frr_distro_packages:
- frr
- frr-pythontools