Added support for RHEL and did some syntax cleaning
Assume that "RedHat" also works where "CentOS" does.
This commit is contained in:
parent
e9aae1dcf6
commit
24ecb51f6f
63 changed files with 544 additions and 497 deletions
|
@ -45,19 +45,26 @@ class yum::cron::download {
|
|||
|
||||
}
|
||||
|
||||
|
||||
# Install changelog plugin
|
||||
#
|
||||
class yum::plugin::changelog {
|
||||
|
||||
package { "yum-plugin-changelog":
|
||||
ensure => installed,
|
||||
name => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
$package = $::operatingsystemrelease ? {
|
||||
/^[1-5]/ => "yum-changelog",
|
||||
default => "yum-plugin-changelog",
|
||||
},
|
||||
default => "yum-plugin-changelog",
|
||||
},
|
||||
}
|
||||
}
|
||||
default: {
|
||||
$package = "yum-plugin-changelog"
|
||||
}
|
||||
}
|
||||
|
||||
package { "yum-plugin-changelog":
|
||||
ensure => installed,
|
||||
name => $package,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -67,15 +74,21 @@ class yum::plugin::changelog {
|
|||
#
|
||||
class yum::plugin::downloadonly {
|
||||
|
||||
package { "yum-plugin-downloadonly":
|
||||
ensure => installed,
|
||||
name => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
$package = $::operatingsystemrelease ? {
|
||||
/^[1-5]/ => "yum-downloadonly",
|
||||
default => "yum-plugin-downloadonly",
|
||||
},
|
||||
default => "yum-plugin-downloadonly",
|
||||
},
|
||||
}
|
||||
}
|
||||
default: {
|
||||
$package = "yum-plugin-downloadonly"
|
||||
}
|
||||
}
|
||||
|
||||
package { "yum-plugin-downloadonly":
|
||||
ensure => installed,
|
||||
name => $package,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -85,14 +98,14 @@ class yum::plugin::downloadonly {
|
|||
#
|
||||
class yum::common {
|
||||
|
||||
case $operatingsystem {
|
||||
case $::operatingsystem {
|
||||
"fedora": {
|
||||
$osname = "fedora"
|
||||
$osver = $operatingsystemrelease
|
||||
$osver = $::operatingsystemrelease
|
||||
}
|
||||
"centos": {
|
||||
"centos","redhat": {
|
||||
$osname = "el"
|
||||
$osver = regsubst($operatingsystemrelease, '^(\d+)\..*$', '\1')
|
||||
$osver = regsubst($::operatingsystemrelease, '^(\d+)\..*$', '\1')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,8 +247,8 @@ class yum::repo::centos-cr {
|
|||
|
||||
tag("bootstrap")
|
||||
|
||||
if $operatingsystem != "CentOS" {
|
||||
fail("CentOS CR repository not supported in ${operatingsystem}")
|
||||
if $::operatingsystem != "CentOS" {
|
||||
fail("CentOS CR repository not supported in ${::operatingsystem}")
|
||||
}
|
||||
|
||||
package { "centos-release-cr":
|
||||
|
@ -404,7 +417,7 @@ class yum::repo::puppetlabs {
|
|||
"fedora": {
|
||||
$dir = "fedora/f\$releasever/products/\$basearch"
|
||||
}
|
||||
"centos": {
|
||||
"centos","redhat": {
|
||||
$dir = "el/\$releasever/products/\$basearch"
|
||||
}
|
||||
default: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue