Merge branch 'master' of bitbucket.org:tmakinen/puppet
This commit is contained in:
commit
cdf2aaaa54
5 changed files with 43 additions and 11 deletions
|
@ -215,11 +215,11 @@ class bacula::director($password=undef,
|
|||
mode => "0770",
|
||||
owner => "bacula",
|
||||
group => "bacula",
|
||||
seltype => "var_spool_t",
|
||||
seltype => "bacula_spool_t",
|
||||
require => Package["bacula-director"],
|
||||
}
|
||||
selinux::manage_fcontext { "${datadir}(/.*)?":
|
||||
type => "var_spool_t",
|
||||
type => "bacula_spool_t",
|
||||
before => File[$datadir],
|
||||
}
|
||||
if $datadir != "/srv/bacula" {
|
||||
|
@ -228,11 +228,11 @@ class bacula::director($password=undef,
|
|||
target => $datadir,
|
||||
owner => "bacula",
|
||||
group => "bacula",
|
||||
seltype => "var_spool_t",
|
||||
seltype => "bacula_spool_t",
|
||||
require => File[$datadir],
|
||||
}
|
||||
selinux::manage_fcontext { "/srv/bacula(/.*)?":
|
||||
type => "var_spool_t",
|
||||
type => "bacula_spool_t",
|
||||
before => File[$datadir],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ Director {
|
|||
|
||||
Messages {
|
||||
Name = "Standard"
|
||||
MailCommand = "mail -s \"Bacula Message\" %r"
|
||||
OperatorCommand = "mail -s \"Bacula Operator Message\" %r"
|
||||
MailCommand = "bsmtp -h <%= @mail_server %> -s \"Bacula Message\" %r"
|
||||
OperatorCommand = "bsmtp -h <%= @mail_server %> -s \"Bacula Operator Message\" %r"
|
||||
mail = root = all, !skipped
|
||||
operator = root = mount
|
||||
append = "/var/log/bacula/bacula.log" = all, !skipped
|
||||
|
|
|
@ -24,8 +24,8 @@ Director {
|
|||
|
||||
Messages {
|
||||
Name = "Standard"
|
||||
MailCommand = "mail -s \"Bacula Message\" %r"
|
||||
OperatorCommand = "mail -s \"Bacula Operator Message\" %r"
|
||||
MailCommand = "bsmtp -h <%= @mail_server %> -s \"Bacula Message\" %r"
|
||||
OperatorCommand = "bsmtp -h <%= @mail_server %> -s \"Bacula Operator Message\" %r"
|
||||
mail = root = all, !skipped, !info
|
||||
operator = root = mount
|
||||
director = bacula-dir = all
|
||||
|
|
|
@ -6,6 +6,6 @@ if [ "`whoami`" = "root" ]; then
|
|||
fi
|
||||
|
||||
find /srv/puppet/reports/ -xdev -mindepth 2 -type f -mtime +<%= @puppet_report_maxage %> \
|
||||
-name '*.yaml.gz' -execdir rm -f -- {} \;
|
||||
-name '*.yaml.gz' -execdir rm -f -- {} \<% if @kernel == 'Linux' %>+<% else %>;<% end %>
|
||||
find /srv/puppet/reports/ -xdev -mindepth 2 -type f -mtime +1 \
|
||||
-name '*.yaml' -execdir gzip -- {} \;
|
||||
-name '*.yaml' -execdir gzip -- {} \<% if @kernel == 'Linux' %>+<% else %>;<% end %>
|
||||
|
|
|
@ -39,6 +39,10 @@ class sasl::client {
|
|||
#
|
||||
# For ldap authentication, see ldap::client for required global variables.
|
||||
#
|
||||
# When using kerberos5 mech on CentOS, Fedora or RedHat system
|
||||
# the saslauthd is ran as saslauth user and uses host/$FQDN from
|
||||
# /etc/saslauthd.keytab for authentication.
|
||||
#
|
||||
class sasl::saslauthd {
|
||||
|
||||
require sasl::client
|
||||
|
@ -55,6 +59,7 @@ class sasl::saslauthd {
|
|||
changes => "set MECH ldap",
|
||||
notify => Service["saslauthd"],
|
||||
}
|
||||
$user = "saslauth"
|
||||
}
|
||||
"openbsd": {
|
||||
Service["saslauthd"] {
|
||||
|
@ -87,9 +92,12 @@ class sasl::saslauthd {
|
|||
"centos","fedora","redhat": {
|
||||
augeas { "set-saslauthd-mech":
|
||||
context => "/files/etc/sysconfig/saslauthd",
|
||||
changes => "set MECH kerberos5",
|
||||
changes => [ "set MECH kerberos5",
|
||||
"set KRB5_KTNAME '\"/etc/saslauthd.keytab\"'",
|
||||
"set @export KRB5_KTNAME", ],
|
||||
notify => Service["saslauthd"],
|
||||
}
|
||||
$user = "saslauth"
|
||||
}
|
||||
"openbsd": {
|
||||
Service["saslauthd"] {
|
||||
|
@ -118,6 +126,30 @@ class sasl::saslauthd {
|
|||
}
|
||||
}
|
||||
|
||||
if $user {
|
||||
case $::operatingsystem {
|
||||
"centos","fedora","redhat": {
|
||||
file { "/var/run/saslauthd":
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => $user,
|
||||
group => $user,
|
||||
before => Service["saslauthd"],
|
||||
}
|
||||
augeas { "set-saslauthd-user":
|
||||
context => "/files/etc/sysconfig/saslauthd",
|
||||
changes => "set DAEMONOPTS '\"--user ${user}\"'",
|
||||
notify => Service["saslauthd"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("Running saslauthd as non root not supported on ${::operatingsystem}")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$user = "root"
|
||||
}
|
||||
|
||||
service { "saslauthd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
|
|
Loading…
Add table
Reference in a new issue