Puppet Class: yum::repo::epel
- Defined in:
- manifests/repo/epel.pp
Overview
Class: yum::repo::epel
This class installs the epel repo
Parameters:
- mirror_url
-
A clean URL to a mirror of ‘dl.fedoraproject.org/pub/epel/`. The paramater is interpolated with the known directory structure to create a the final baseurl parameter for each yumrepo so it must be “clean”, i.e., without a query string like `?key1=valA&key2=valB`. Additionally, it may not contain a trailing slash. Example: `mirror.example.com/pub/rpm/epel` Default: `undef`
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'manifests/repo/epel.pp', line 16
class yum::repo::epel (
$mirror_url = undef
) {
if $mirror_url {
validate_re(
$mirror_url,
'^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\:[0-9]{1,5})?(?:\/[\w~-]*)*$',
'$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.'
)
}
$osver = $::operatingsystem ? {
'Amazon' => [ '6' ],
'XenServer' => [ '5' ],
default => split($::operatingsystemrelease, '[.]')
}
$baseurl_epel = $mirror_url ? {
undef => undef,
default => "${mirror_url}/${osver[0]}/\$basearch/",
}
$baseurl_epel_debuginfo = $mirror_url ? {
undef => undef,
default => "${mirror_url}/${osver[0]}/\$basearch/debug",
}
$baseurl_epel_source = $mirror_url ? {
undef => undef,
default => "${mirror_url}/${osver[0]}/SRPMS/",
}
$baseurl_epel_testing = $mirror_url ? {
undef => undef,
default => "${mirror_url}/testing/${osver[0]}/\$basearch/",
}
$baseurl_epel_testing_debuginfo = $mirror_url ? {
undef => undef,
default => "${mirror_url}/testing/${osver[0]}/\$basearch/debug",
}
$baseurl_epel_testing_source = $mirror_url ? {
undef => undef,
default => "${mirror_url}/testing/${osver[0]}/SRPMS/",
}
yum::managed_yumrepo { 'epel':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch",
baseurl => $baseurl_epel,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch",
enabled => 1,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
gpgkey_source => "puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 16,
}
yum::managed_yumrepo { 'epel-debuginfo':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Debug",
baseurl => $baseurl_epel_debuginfo,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch",
enabled => 0,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 16,
}
yum::managed_yumrepo { 'epel-source':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Source",
baseurl => $baseurl_epel_source,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-${osver[0]}&arch=\$basearch",
enabled => 0,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 16,
}
yum::managed_yumrepo { 'epel-testing':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch",
baseurl => $baseurl_epel_testing,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel${osver[0]}&arch=\$basearch",
enabled => 0,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 17,
}
yum::managed_yumrepo { 'epel-testing-debuginfo':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Debug",
baseurl => $baseurl_epel_testing_debuginfo,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel${osver[0]}&arch=\$basearch",
enabled => 0,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 17,
}
yum::managed_yumrepo { 'epel-testing-source':
descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Source",
baseurl => $baseurl_epel_testing_source,
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel${osver[0]}&arch=\$basearch",
enabled => 0,
gpgcheck => 1,
failovermethod => 'priority',
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}",
priority => 17,
}
}
|