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",
|
mode => "0750",
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "backuppc",
|
group => "backuppc",
|
||||||
|
require => Package["BackupPC"],
|
||||||
}
|
}
|
||||||
file { "/var/lib/BackupPC/.ssh/id_rsa":
|
file { "/var/lib/BackupPC/.ssh/id_rsa":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
|
@ -6,15 +6,31 @@
|
||||||
# $update:
|
# $update:
|
||||||
# Set to false to disable automatic virus database updates.
|
# Set to false to disable automatic virus database updates.
|
||||||
#
|
#
|
||||||
class clamav($update="true") {
|
class clamav($update=true) {
|
||||||
|
|
||||||
package { "clamav":
|
package { "clamav":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $update == false {
|
case $::operatingsystem {
|
||||||
file { "/etc/cron.daily/freshclam":
|
"centos","redhat": {
|
||||||
ensure => absent,
|
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
|
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":
|
package { "clamd":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
|
name => $package,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "clamd":
|
service { "clamd":
|
||||||
ensure => running,
|
ensure => running,
|
||||||
enable => true,
|
name => $service,
|
||||||
|
enable => true,
|
||||||
|
require => Package["clamd"],
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,15 +220,23 @@ define cups::printer($uri, $location = "", $ensure = present) {
|
||||||
class cups::lpd {
|
class cups::lpd {
|
||||||
|
|
||||||
include cups::server
|
include cups::server
|
||||||
include inetd::server
|
|
||||||
|
|
||||||
package { "cups-lpd":
|
package { "cups-lpd":
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
}
|
}
|
||||||
|
|
||||||
inetd::service { "cups-lpd":
|
if $::operatingsystem in ["CentOS","RedHat"] and versioncmp($::operatingsystemrelease, "7") > 0 {
|
||||||
ensure => present,
|
service { "cups-lpd.socket":
|
||||||
require => Package["cups-lpd"],
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
require => Package["cups-lpd"],
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
include inetd::server
|
||||||
|
inetd::service { "cups-lpd":
|
||||||
|
ensure => present,
|
||||||
|
require => Package["cups-lpd"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,11 +17,14 @@ NOZEROCONF=yes
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @ip6addr == 'none' -%>
|
<% if @ip6addr == 'none' -%>
|
||||||
IPV6INIT=no
|
IPV6INIT=no
|
||||||
|
IPV6_AUTOCONF=no
|
||||||
|
<% elsif @ip6addr == 'auto' -%>
|
||||||
|
IPV6INIT=yes
|
||||||
|
IPV6_AUTOCONF=yes
|
||||||
<% else -%>
|
<% else -%>
|
||||||
IPV6INIT=yes
|
IPV6INIT=yes
|
||||||
<% if @ip6addr != 'auto' -%>
|
IPV6_AUTOCONF=no
|
||||||
IPV6ADDR=<%= @ip6addr %>/<%= @ip6netmask %>
|
IPV6ADDR=<%= @ip6addr %>/<%= @ip6netmask %>
|
||||||
<% end -%>
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if @name =~ /br[0-9]/ -%>
|
<% if @name =~ /br[0-9]/ -%>
|
||||||
TYPE=Bridge
|
TYPE=Bridge
|
||||||
|
|
|
@ -94,10 +94,16 @@ class sasl::saslauthd {
|
||||||
augeas { "set-saslauthd-mech":
|
augeas { "set-saslauthd-mech":
|
||||||
context => "/files/etc/sysconfig/saslauthd",
|
context => "/files/etc/sysconfig/saslauthd",
|
||||||
changes => [ "set MECH kerberos5",
|
changes => [ "set MECH kerberos5",
|
||||||
"set KRB5_KTNAME '\"/etc/saslauthd.keytab\"'",
|
"set KRB5_KTNAME '\"/etc/saslauthd.keytab\"'", ],
|
||||||
"set @export KRB5_KTNAME", ],
|
|
||||||
notify => Service["saslauthd"],
|
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"
|
$user = "saslauth"
|
||||||
}
|
}
|
||||||
"openbsd": {
|
"openbsd": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue