Puppet Class: yum::repo::integ_ganeti
- Defined in:
- manifests/repo/integ_ganeti.pp
Overview
Class: yum::repo::integ_ganeti
This class installs the Integ Ganeti Yum repo
Parameters:
- mirror_url
-
A clean URL to a mirror of ‘jfut.integ.jp/linux/ganeti/`. 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/ganeti` 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 |
# File 'manifests/repo/integ_ganeti.pp', line 16
class yum::repo::integ_ganeti (
$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.'
)
}
# Workaround for Facter < 1.7.0
$osver = split($::operatingsystemrelease, '[.]')
case $::operatingsystem {
'Fedora': {
$release = 'fedora'
}
'RedHat','CentOS','Scientific': {
$release = $osver[0]
}
default: {
fail("${title}: Operating system '${::operatingsystem}' is not currently supported")
}
}
$baseurl_integ_ganeti = $mirror_url ? {
undef => "http://jfut.integ.jp/linux/ganeti/${release}/\$basearch",
default => "${mirror_url}/${release}/\$basearch",
}
$baseurl_integ_ganeti_source = $mirror_url ? {
undef => "http://jfut.integ.jp/linux/ganeti/${release}/SRPMS",
default => "${mirror_url}/${release}/SRPMS",
}
yum::managed_yumrepo { 'integ-ganeti':
descr => "Integ Ganeti Packages ${osver[0]} - \$basearch",
baseurl => $baseurl_integ_ganeti,
enabled => 1,
gpgcheck => 0,
priority => 15,
}
yum::managed_yumrepo { 'integ-ganeti-source':
descr => "Integ Ganeti Packages ${osver[0]} - Source",
baseurl => $baseurl_integ_ganeti_source,
enabled => 0,
gpgcheck => 0,
priority => 15,
}
}
|