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
|
@ -38,7 +38,7 @@ class backuppc::client {
|
|||
|
||||
backuppc::manualclient { $homename:
|
||||
ensure => present,
|
||||
operatingsystem => $operatingsystem,
|
||||
operatingsystem => $::operatingsystem,
|
||||
}
|
||||
|
||||
include rsync
|
||||
|
@ -104,12 +104,25 @@ class backuppc::server {
|
|||
require => Package["BackupPC"],
|
||||
}
|
||||
|
||||
if $operatingsystem == "CentOS" and $operatingsystemrelease >= 6 {
|
||||
if "${selinux}" == "true" {
|
||||
selinux::manage_fcontext { "/etc/BackupPC(/.*)?":
|
||||
type => "httpd_sys_rw_content_t",
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^[1-5]/: {
|
||||
$backuppc_seltype = "httpd_sys_script_rw_t"
|
||||
}
|
||||
default: {
|
||||
$backuppc_seltype = "httpd_sys_rw_content_t"
|
||||
if $::selinux == "true" {
|
||||
selinux::manage_fcontext { "/etc/BackupPC(/.*)?":
|
||||
type => $backuppc_seltype,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default: {
|
||||
$backuppc_seltype = "httpd_sys_rw_content_t"
|
||||
}
|
||||
}
|
||||
|
||||
file { "/etc/BackupPC/apache.users":
|
||||
|
@ -117,13 +130,7 @@ class backuppc::server {
|
|||
mode => "0640",
|
||||
owner => "root",
|
||||
group => $apache::sslserver::group,
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
seltype => $backuppc_seltype,
|
||||
require => Package["BackupPC"],
|
||||
}
|
||||
|
||||
|
@ -133,13 +140,7 @@ class backuppc::server {
|
|||
mode => "0440",
|
||||
owner => "backuppc",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
seltype => $backuppc_seltype,
|
||||
require => Package["BackupPC"],
|
||||
notify => Service["backuppc"],
|
||||
}
|
||||
|
@ -151,13 +152,7 @@ class backuppc::server {
|
|||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
seltype => $backuppc_seltype,
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
}
|
||||
|
@ -170,13 +165,7 @@ class backuppc::server {
|
|||
mode => "0640",
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
seltype => $backuppc_seltype,
|
||||
source => "puppet:///modules/custom/empty",
|
||||
require => Package["BackupPC"],
|
||||
notify => Exec["generate-backuppc-hosts"],
|
||||
|
@ -191,13 +180,7 @@ class backuppc::server {
|
|||
}
|
||||
|
||||
File <<| tag == "backuppc" |>> {
|
||||
seltype => $operatingsystem ? {
|
||||
"centos" => $operatingsystemrelease ? {
|
||||
/^5/ => "httpd_sys_script_rw_t",
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
default => "httpd_sys_rw_content_t",
|
||||
},
|
||||
seltype => $backuppc_seltype,
|
||||
}
|
||||
|
||||
service { "backuppc":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue