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
|
@ -6,7 +6,7 @@ class sendmail::common {
|
|||
$mail_domain = $domain
|
||||
}
|
||||
|
||||
if $operatingsystem != "OpenBSD" {
|
||||
if $::operatingsystem != "OpenBSD" {
|
||||
package { "sendmail":
|
||||
ensure => installed,
|
||||
name => [ "sendmail", "sendmail-cf", ],
|
||||
|
@ -18,8 +18,8 @@ class sendmail::common {
|
|||
}
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
"centos","fedora": {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat","fedora": {
|
||||
file { "/etc/sysconfig/sendmail":
|
||||
ensure => present,
|
||||
content => "DAEMON=no\nQUEUE=1h\n",
|
||||
|
@ -48,20 +48,20 @@ class sendmail::client inherits sendmail::common {
|
|||
}
|
||||
|
||||
file { "/etc/mail/submit.mc":
|
||||
path => $operatingsystem ? {
|
||||
path => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf/submit.mc",
|
||||
default => "/etc/mail/submit.mc",
|
||||
},
|
||||
ensure => present,
|
||||
content => template("sendmail/submit.mc.erb", "sendmail/submit.mc.msp.erb"),
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "bin",
|
||||
default => "root",
|
||||
},
|
||||
mode => "0644",
|
||||
notify => Exec["make submit.cf"],
|
||||
require => $operatingsystem ? {
|
||||
require => $::operatingsystem ? {
|
||||
"openbsd" => undef,
|
||||
default => Package["sendmail"],
|
||||
},
|
||||
|
@ -69,12 +69,12 @@ class sendmail::client inherits sendmail::common {
|
|||
|
||||
exec { "make submit.cf":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin:/etc/mail",
|
||||
cwd => $operatingsystem ? {
|
||||
cwd => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf",
|
||||
default => "/etc/mail",
|
||||
},
|
||||
refreshonly => true,
|
||||
notify => $operatingsystem ? {
|
||||
notify => $::operatingsystem ? {
|
||||
"openbsd" => undef,
|
||||
default => Service["sendmail"],
|
||||
},
|
||||
|
@ -83,13 +83,13 @@ class sendmail::client inherits sendmail::common {
|
|||
file { "/etc/mail/submit.cf":
|
||||
ensure => present,
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
"ubuntu" => "smmsp",
|
||||
default => "root",
|
||||
},
|
||||
mode => "0644",
|
||||
source => $operatingsystem ? {
|
||||
source => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf/submit.cf",
|
||||
default => undef,
|
||||
},
|
||||
|
@ -140,8 +140,8 @@ class sendmail::server inherits sendmail::common {
|
|||
type => "sendmail_exec_t",
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
"centos","fedora": {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat","fedora": {
|
||||
File["/etc/sysconfig/sendmail"] {
|
||||
content => "DAEMON=yes\nQUEUE=1h\n",
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ class sendmail::server inherits sendmail::common {
|
|||
}
|
||||
|
||||
file { "sendmail.mc":
|
||||
name => $operatingsystem ? {
|
||||
name => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf/sendmail.mc",
|
||||
default => "/etc/mail/sendmail.mc",
|
||||
},
|
||||
|
@ -191,11 +191,11 @@ class sendmail::server inherits sendmail::common {
|
|||
}
|
||||
exec { "make sendmail.cf":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin:/etc/mail",
|
||||
cwd => $operatingsystem ? {
|
||||
cwd => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf",
|
||||
default => "/etc/mail",
|
||||
},
|
||||
require => $operatingsystem ? {
|
||||
require => $::operatingsystem ? {
|
||||
"openbsd" => undef,
|
||||
default => Package["sendmail"],
|
||||
},
|
||||
|
@ -206,7 +206,7 @@ class sendmail::server inherits sendmail::common {
|
|||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
source => $operatingsystem ? {
|
||||
source => $::operatingsystem ? {
|
||||
"openbsd" => "/usr/share/sendmail/cf/sendmail.cf",
|
||||
default => undef,
|
||||
},
|
||||
|
@ -231,7 +231,7 @@ class sendmail::server inherits sendmail::common {
|
|||
|
||||
file { "/etc/aliases":
|
||||
ensure => present,
|
||||
name => $operatingsystem ? {
|
||||
name => $::operatingsystem ? {
|
||||
"openbsd" => "/etc/mail/aliases",
|
||||
default => "/etc/aliases",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue