49 lines
1.5 KiB
Puppet
49 lines
1.5 KiB
Puppet
# Class: profiles::yum::epel
|
|
#
|
|
# This class manages the puppet7 yum repository for the system.
|
|
#
|
|
# Parameters:
|
|
# -----------
|
|
# - $baseurl: The base URL for the puppet7 yum repository. This should be the root
|
|
# URL of your puppet7 mirror server.
|
|
#
|
|
# Actions:
|
|
# --------
|
|
# - Checks the OS release version.
|
|
#
|
|
# - If the release version is 7, 8, or 9, it sets up the 'puppet7' yum repository
|
|
# and installs the puppet7 release RPM from the provided baseurl.
|
|
#
|
|
# - If the release version is not supported, it raises an error.
|
|
#
|
|
# - The repo configuration includes the baseurl parameterized with the OS
|
|
# release version and architecture, and specifies the GPG key.
|
|
#
|
|
# Example usage:
|
|
# --------------
|
|
# To use this class with the default parameters:
|
|
# include profiles::yum::puppet7
|
|
#
|
|
# To specify a custom base URL:
|
|
# class { 'profiles::yum::puppet7':
|
|
# baseurl => 'http://mylocalmirror.com/yum',
|
|
# }
|
|
class profiles::yum::puppet7 (
|
|
Array[String] $managed_repos,
|
|
String $baseurl = 'http://repos.main.unkin.net/puppet7',
|
|
) {
|
|
$releasever = $facts['os']['release']['major']
|
|
$basearch = $facts['os']['architecture']
|
|
|
|
if 'puppet7' in $managed_repos {
|
|
yumrepo { 'puppet7':
|
|
name => 'puppet7',
|
|
descr => 'puppet7 repository',
|
|
target => '/etc/yum.repos.d/puppet7.repo',
|
|
baseurl => "${baseurl}/el/${releasever}-daily/${basearch}/os/",
|
|
gpgkey => 'https://yum.puppet.com/RPM-GPG-KEY-puppet-20250406',
|
|
#gpgkey => "${baseurl}/el/${releasever}-daily/${basearch}/os/RPM-GPG-KEY-puppet",
|
|
}
|
|
}
|
|
}
|