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:
parent
7d415fd85e
commit
8a6b3ef0fb
@ -5,42 +5,78 @@ profiles::reposync::repos_list:
|
|||||||
description: 'AlmaLinux 8.8 - BaseOS'
|
description: 'AlmaLinux 8.8 - BaseOS'
|
||||||
osname: 'almalinux'
|
osname: 'almalinux'
|
||||||
release: '8.8'
|
release: '8.8'
|
||||||
baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/BaseOS/x86_64/os/'
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.8/baseos
|
||||||
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
almalinux_8_8_appstream:
|
almalinux_8_8_appstream:
|
||||||
repository: 'AppStream'
|
repository: 'AppStream'
|
||||||
description: 'AlmaLinux 8.8 - AppStream'
|
description: 'AlmaLinux 8.8 - AppStream'
|
||||||
osname: 'almalinux'
|
osname: 'almalinux'
|
||||||
release: '8.8'
|
release: '8.8'
|
||||||
baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/AppStream/x86_64/os/'
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.8/appstream
|
||||||
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
almalinux_8_8_highavailability:
|
almalinux_8_8_highavailability:
|
||||||
repository: 'HighAvailability'
|
repository: 'HighAvailability'
|
||||||
description: 'AlmaLinux 8.8 - HighAvailability'
|
description: 'AlmaLinux 8.8 - HighAvailability'
|
||||||
osname: 'almalinux'
|
osname: 'almalinux'
|
||||||
release: '8.8'
|
release: '8.8'
|
||||||
baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/HighAvailability/x86_64/os/'
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.8/ha
|
||||||
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
almalinux_8_8_powertools:
|
almalinux_8_8_powertools:
|
||||||
repository: 'PowerTools'
|
repository: 'PowerTools'
|
||||||
description: 'AlmaLinux 8.8 - PowerTools'
|
description: 'AlmaLinux 8.8 - PowerTools'
|
||||||
osname: 'almalinux'
|
osname: 'almalinux'
|
||||||
release: '8.8'
|
release: '8.8'
|
||||||
baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/PowerTools/x86_64/os/'
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.8/powertools
|
||||||
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
almalinux_8_8_extras:
|
almalinux_8_8_extras:
|
||||||
repository: 'extras'
|
repository: 'extras'
|
||||||
description: 'AlmaLinux 8.8 - extras'
|
description: 'AlmaLinux 8.8 - extras'
|
||||||
osname: 'almalinux'
|
osname: 'almalinux'
|
||||||
release: '8.8'
|
release: '8.8'
|
||||||
baseurl: 'http://mirror.aarnet.edu.au/pub/almalinux/8.8/extras/x86_64/os/'
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.8/extras
|
||||||
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
|
almalinux_8_9_baseos:
|
||||||
|
repository: 'BaseOS'
|
||||||
|
description: 'AlmaLinux 8.9 - BaseOS'
|
||||||
|
osname: 'almalinux'
|
||||||
|
release: '8.9'
|
||||||
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.9/baseos
|
||||||
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
|
almalinux_8_9_appstream:
|
||||||
|
repository: 'AppStream'
|
||||||
|
description: 'AlmaLinux 8.9 - AppStream'
|
||||||
|
osname: 'almalinux'
|
||||||
|
release: '8.9'
|
||||||
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.9/appstream
|
||||||
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
|
almalinux_8_9_highavailability:
|
||||||
|
repository: 'HighAvailability'
|
||||||
|
description: 'AlmaLinux 8.9 - HighAvailability'
|
||||||
|
osname: 'almalinux'
|
||||||
|
release: '8.9'
|
||||||
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.9/ha
|
||||||
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
|
almalinux_8_9_powertools:
|
||||||
|
repository: 'PowerTools'
|
||||||
|
description: 'AlmaLinux 8.9 - PowerTools'
|
||||||
|
osname: 'almalinux'
|
||||||
|
release: '8.9'
|
||||||
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.9/powertools
|
||||||
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
|
almalinux_8_9_extras:
|
||||||
|
repository: 'extras'
|
||||||
|
description: 'AlmaLinux 8.9 - extras'
|
||||||
|
osname: 'almalinux'
|
||||||
|
release: '8.9'
|
||||||
|
mirrorlist: https://mirrors.almalinux.org/mirrorlist/8.9/extras
|
||||||
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
gpgkey: 'http://mirror.aarnet.edu.au/pub/almalinux/RPM-GPG-KEY-AlmaLinux'
|
||||||
epel_8_everything:
|
epel_8_everything:
|
||||||
repository: 'Everything'
|
repository: 'Everything'
|
||||||
description: 'EPEL 8 Everything'
|
description: 'EPEL 8 Everything'
|
||||||
osname: 'epel'
|
osname: 'epel'
|
||||||
release: '8'
|
release: '8'
|
||||||
baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
|
# baseurl: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
|
||||||
|
mirrorlist: 'https://mirrors.fedoraproject.org/mirrorlist?repo=epel-8&arch=x86_64'
|
||||||
gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
|
gpgkey: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
|
||||||
mariadb_11_2_el8:
|
mariadb_11_2_el8:
|
||||||
repository: 'el8'
|
repository: 'el8'
|
||||||
|
|||||||
@ -4,26 +4,32 @@ define profiles::reposync::repos (
|
|||||||
String $description,
|
String $description,
|
||||||
String $osname,
|
String $osname,
|
||||||
String $release,
|
String $release,
|
||||||
Stdlib::HTTPUrl $baseurl,
|
|
||||||
Stdlib::HTTPUrl $gpgkey,
|
Stdlib::HTTPUrl $gpgkey,
|
||||||
String $arch = 'x86_64',
|
String $arch = 'x86_64',
|
||||||
String $repo_owner = 'root',
|
String $repo_owner = 'root',
|
||||||
String $repo_group = 'root',
|
String $repo_group = 'root',
|
||||||
Stdlib::Absolutepath $basepath = '/data/repos',
|
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}")
|
$repos_name = downcase("${osname}-${release}-${repository}-${arch}")
|
||||||
$conf_file = "/etc/reposync/conf.d/${repos_name}.conf"
|
$conf_file = "/etc/reposync/conf.d/${repos_name}.conf"
|
||||||
|
|
||||||
# Create the repository configuration
|
# Create the repository configuration
|
||||||
yumrepo { $repos_name:
|
yumrepo { $repos_name:
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
descr => $description,
|
descr => $description,
|
||||||
baseurl => $baseurl,
|
baseurl => $baseurl,
|
||||||
gpgkey => $gpgkey,
|
mirrorlist => $mirrorlist,
|
||||||
target => '/etc/yum.repos.d/reposync.repo',
|
gpgkey => $gpgkey,
|
||||||
enabled => 0,
|
target => '/etc/yum.repos.d/reposync.repo',
|
||||||
gpgcheck => 1,
|
enabled => 0,
|
||||||
|
gpgcheck => 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ensure the repo dest path exists
|
# Ensure the repo dest path exists
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user