Puppet Module to install/configure clamd and freshclam on Debian and RedHat
The clamav module provides some classes to install and configure most of the components of clamav.
You may also choose to manage only the parts that you need.
This module aims to be minimalistic.
No options produces stock config files as provided by your package installer.
This module has the following components that can be managed (or not):
only need to install the module
Minimal clamav package install for command line use:
include clamav
class { 'clamav':
manage_clamd => true,
manage_freshclam => true,
clamd_service_ensure => 'running',
freshclam_service_ensure => 'stopped',
}
class { 'clamav':
manage_user => true,
uid => 499,
gid => 499,
shell => '/sbin/nologin',
manage_clamd => true,
manage_freshclam => true,
}
class { 'clamav':
manage_clamd => true,
manage_freshclam => true,
clamd_options => {
'MaxScanSize' => '500M',
'MaxFileSize' => '150M',
},
freshclam_options => {
'LogTime' => 'yes',
'HTTPProxyServer' => 'myproxy.proxy.com',
'HTTPProxyPort' => '80',
'NotifyClamd' => '/etc/clamd.conf',
'DatabaseMirror' => [
'clam.host1.mydomain.com',
'clam.host2.mydomain.com',
],
},
}
class { 'clamav':
manage_repo => false,
clamd_options => {
'TCPSocket' => '3310',
'TCPAddr' => '127.0.0.1',
},
clamav_milter_options => {
'AddHeader' => 'add',
'OnInfected' => 'Reject',
'RejectMsg' => 'Message rejected: Infected by %v',
},
manage_clamd => true,
manage_freshclam => true,
manage_clamav_milter => true,
clamd_service_ensure => 'running',
}
include clamav
---
clamav::manage_clamd: true
clamav::manage_freshclam: true
clamav::clamd_options:
MaxScanSize: 500M
MaxFileSize: 150M
clamav::freshclam_options:
LogTime: yes
HTTPProxyServer: myproxy.proxy.com
HTTPProxyPort: 80
NotifyClamd: /etc/clamd.conf
DatabaseMirror:
- clam.host1.mydomain.com
- clam.host2.mydomain.com
This module has been built on and tested against Puppet 3.8 and higher.
While I am sure other versions work, I have not tested them.
This module supports modern RedHat and Debian based systems.
No plans to support other versions (unless you add it :)..
Pull Requests welcome