
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 1.04 KB | hits: 25 | expires: Never
newrepo_conf { "base":
yumserver => "testserver",
}
define newrepo_conf ( $yumserver, $os = "OEL" ) {
case $os {
"OEL": {
$longname = "EnterpriseLinux"
$shortname = "EL"
$description = "Enterprise Linux"
}
"OVS": {
$longname = "OracleVM"
$shortname = "OVM"
$description = "Oracle VM Server"
}
}
$repo_name = "$shortname_$operatingsystemrelease_base"
yumrepo { "$repo_name":
baseurl => "http://$yumserver/yum/$longname/$shortname$operatingsystemrelease/latest/$architecture/",
descr => "Latest Packages for $description $operatingsystemrelease - $architecture",
enabled => "1",
gpgcheck => "1",
protect => "1",
gpgkey => "file:///usr/share/rhn/RPM-GPG-KEY",
}
}