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,17 +6,33 @@
|
||||||
# $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 {
|
||||||
|
"centos","redhat": {
|
||||||
|
if (versioncmp($::operatingsystemrelease, 7) < 0) {
|
||||||
|
if (!$update) {
|
||||||
file { "/etc/cron.daily/freshclam":
|
file { "/etc/cron.daily/freshclam":
|
||||||
ensure => absent,
|
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