clamav: Add support for CentOS/RedHat 7.
This commit is contained in:
parent
ff7af2ea97
commit
6626efcbc5
1 changed files with 20 additions and 4 deletions
|
@ -6,15 +6,31 @@
|
|||
# $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 {
|
||||
file { "/etc/cron.daily/freshclam":
|
||||
ensure => absent,
|
||||
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}")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue