chore: centralise all yum repo configuration (#436)

- add 30+ repository definitions to AlmaLinux/all_releases.yaml with `ensure: absent` defaults
- update all role-specific hieradata files to use `ensure: present` pattern
- remove duplicated repository URL/GPG key configurations from individual roles
- maintains existing functionality while improving maintainability"

Reviewed-on: #436
This commit was merged in pull request #436.
This commit is contained in:
2026-01-15 21:35:13 +11:00
parent 9f5b1cec82
commit dbe1398218
26 changed files with 299 additions and 439 deletions
+8 -5
View File
@@ -32,11 +32,14 @@ class profiles::yum::global (
$key_url = $repo['gpgkey']
$key_file = "/etc/pki/rpm-gpg/${name}-gpg-key"
exec { "download_gpg_key_${name}":
command => "curl -s -o ${key_file} ${key_url} && rpm --import ${key_file}",
path => ['/bin', 'usr/bin'],
creates => $key_file,
before => Yumrepo[$name],
# only download the key if the repo is present
if $repo['ensure'] == 'present' {
exec { "download_gpg_key_${name}":
command => "curl -s -o ${key_file} ${key_url} && rpm --import ${key_file}",
path => ['/bin', 'usr/bin'],
creates => $key_file,
before => Yumrepo[$name],
}
}
}
# create the repo