feat: add mirrorlist capability to reposyncer
- add mirrorlist param to reposyncer repos - update almalinux 8.8 repos to use mirrorlist - add almalinux 8.9 repos
This commit is contained in:
@@ -4,26 +4,32 @@ define profiles::reposync::repos (
|
||||
String $description,
|
||||
String $osname,
|
||||
String $release,
|
||||
Stdlib::HTTPUrl $baseurl,
|
||||
Stdlib::HTTPUrl $gpgkey,
|
||||
String $arch = 'x86_64',
|
||||
String $repo_owner = 'root',
|
||||
String $repo_group = 'root',
|
||||
Stdlib::Absolutepath $basepath = '/data/repos',
|
||||
Optional[Stdlib::HTTPUrl] $baseurl = undef,
|
||||
Optional[Stdlib::HTTPUrl] $mirrorlist = undef,
|
||||
){
|
||||
|
||||
if ($mirrorlist == undef and $baseurl == undef) or ($mirrorlist != undef and $baseurl != undef) {
|
||||
fail('profiles::reposync::repos must have either mirrorlist or baseurl set, but not both')
|
||||
}
|
||||
|
||||
$repos_name = downcase("${osname}-${release}-${repository}-${arch}")
|
||||
$conf_file = "/etc/reposync/conf.d/${repos_name}.conf"
|
||||
|
||||
# Create the repository configuration
|
||||
yumrepo { $repos_name:
|
||||
ensure => 'present',
|
||||
descr => $description,
|
||||
baseurl => $baseurl,
|
||||
gpgkey => $gpgkey,
|
||||
target => '/etc/yum.repos.d/reposync.repo',
|
||||
enabled => 0,
|
||||
gpgcheck => 1,
|
||||
ensure => 'present',
|
||||
descr => $description,
|
||||
baseurl => $baseurl,
|
||||
mirrorlist => $mirrorlist,
|
||||
gpgkey => $gpgkey,
|
||||
target => '/etc/yum.repos.d/reposync.repo',
|
||||
enabled => 0,
|
||||
gpgcheck => 1,
|
||||
}
|
||||
|
||||
# Ensure the repo dest path exists
|
||||
|
||||
Reference in New Issue
Block a user