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
|
@ -37,7 +37,7 @@ class selinux {
|
|||
notify => Exec["set-selinux-mode"],
|
||||
}
|
||||
|
||||
if $operatingsystem == "CentOS" and $operatingsystemrelease =~ /^[1-5]\./ {
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and $::operatingsystemrelease =~ /^[1-5]\./ {
|
||||
service { "setroubleshoot":
|
||||
ensure => $selinux_type ? {
|
||||
disabled => stopped,
|
||||
|
@ -72,16 +72,16 @@ class selinux {
|
|||
#
|
||||
class selinux::tools {
|
||||
|
||||
case $operatingsystem {
|
||||
case $::operatingsystem {
|
||||
"fedora": { $package = "policycoreutils-python" }
|
||||
"centos": {
|
||||
case $operatingsystemrelease {
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^6/: { $package = "policycoreutils-python" }
|
||||
default: { $package = "policycoreutils" }
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("selinux::tools not supported on ${operatingsystem}")
|
||||
fail("selinux::tools not supported on ${::operatingsystem}")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ class selinux::module::devel {
|
|||
|
||||
include selinux::tools
|
||||
|
||||
if $::operatingsystem == "CentOS" {
|
||||
if $::operatingsystem in ["CentOS","RedHat"] {
|
||||
if $::operatingsystemrelease =~ /^5\.[0-9]/ {
|
||||
package { "selinux-policy-devel":
|
||||
ensure => installed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue