Merge branch 'master' of bitbucket.org:tmakinen/puppet
This commit is contained in:
commit
1559400cde
5 changed files with 84 additions and 14 deletions
|
@ -202,6 +202,7 @@ class backuppc::server {
|
|||
mode => "0750",
|
||||
owner => "root",
|
||||
group => "backuppc",
|
||||
require => Package["BackupPC"],
|
||||
}
|
||||
file { "/var/lib/BackupPC/.ssh/id_rsa":
|
||||
ensure => present,
|
||||
|
|
|
@ -6,17 +6,33 @@
|
|||
# $update:
|
||||
# Set to false to disable automatic virus database updates.
|
||||
#
|
||||
class clamav($update="true") {
|
||||
class clamav($update=true) {
|
||||
|
||||
package { "clamav":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
if $update == false {
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
if (versioncmp($::operatingsystemrelease, 7) < 0) {
|
||||
if (!$update) {
|
||||
file { "/etc/cron.daily/freshclam":
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
package { "clamav-update":
|
||||
ensure => $update ? {
|
||||
true => "present",
|
||||
false => "absent",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default: {
|
||||
fail("clamav module not supported on ${::operatingsystem}")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -27,13 +43,49 @@ class clamav::daemon {
|
|||
|
||||
require clamav
|
||||
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
if (versioncmp($::operatingsystemrelease, 7) < 0) {
|
||||
$package = "clamd"
|
||||
$service = "clamd"
|
||||
} else {
|
||||
$package = "clamav-scanner-systemd"
|
||||
$service = "clamd@scan"
|
||||
exec { "sed -i 's/^Example$/#Example/' /etc/clamd.d/scan.conf":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
user => "root",
|
||||
onlyif => "egrep '^Example$' /etc/clamd.d/scan.conf",
|
||||
require => Package["clamd"],
|
||||
notify => Service["clamd"],
|
||||
}
|
||||
exec { "sed -i 's/^#LocalSocket /LocalSocket /' /etc/clamd.d/scan.conf":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
user => "root",
|
||||
onlyif => "egrep '#LocalSocket ' /etc/clamd.d/scan.conf",
|
||||
require => Package["clamd"],
|
||||
notify => Service["clamd"],
|
||||
}
|
||||
file { "/etc/clamd.conf":
|
||||
ensure => link,
|
||||
target => "/etc/clamd.d/scan.conf",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
require => Package["clamd"],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
package { "clamd":
|
||||
ensure => installed,
|
||||
name => $package,
|
||||
}
|
||||
|
||||
service { "clamd":
|
||||
ensure => running,
|
||||
name => $service,
|
||||
enable => true,
|
||||
require => Package["clamd"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -220,16 +220,24 @@ define cups::printer($uri, $location = "", $ensure = present) {
|
|||
class cups::lpd {
|
||||
|
||||
include cups::server
|
||||
include inetd::server
|
||||
|
||||
package { "cups-lpd":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "7") > 0 {
|
||||
service { "cups-lpd.socket":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["cups-lpd"],
|
||||
}
|
||||
} else {
|
||||
include inetd::server
|
||||
inetd::service { "cups-lpd":
|
||||
ensure => present,
|
||||
require => Package["cups-lpd"],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,15 @@ NOZEROCONF=yes
|
|||
<% end -%>
|
||||
<% if @ip6addr == 'none' -%>
|
||||
IPV6INIT=no
|
||||
IPV6_AUTOCONF=no
|
||||
<% elsif @ip6addr == 'auto' -%>
|
||||
IPV6INIT=yes
|
||||
IPV6_AUTOCONF=yes
|
||||
<% else -%>
|
||||
IPV6INIT=yes
|
||||
<% if @ip6addr != 'auto' -%>
|
||||
IPV6_AUTOCONF=no
|
||||
IPV6ADDR=<%= @ip6addr %>/<%= @ip6netmask %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if @name =~ /br[0-9]/ -%>
|
||||
TYPE=Bridge
|
||||
DELAY=0
|
||||
|
|
|
@ -94,10 +94,16 @@ class sasl::saslauthd {
|
|||
augeas { "set-saslauthd-mech":
|
||||
context => "/files/etc/sysconfig/saslauthd",
|
||||
changes => [ "set MECH kerberos5",
|
||||
"set KRB5_KTNAME '\"/etc/saslauthd.keytab\"'",
|
||||
"set @export KRB5_KTNAME", ],
|
||||
"set KRB5_KTNAME '\"/etc/saslauthd.keytab\"'", ],
|
||||
notify => Service["saslauthd"],
|
||||
}
|
||||
if versioncmp($::operatingsystemrelease, 7) < 0 {
|
||||
augeas { "export-saslauthd-keytab":
|
||||
context => "/files/etc/sysconfig/saslauthd",
|
||||
changes => "set @export KRB5_KTNAME",
|
||||
notify => Service["saslauthd"],
|
||||
}
|
||||
}
|
||||
$user = "saslauth"
|
||||
}
|
||||
"openbsd": {
|
||||
|
|
Loading…
Add table
Reference in a new issue