]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/clamav/manifests/init.pp
variable assignment does not clone string...
[dsa-puppet.git] / modules / clamav / manifests / init.pp
1 # = Class: clamav
2 #
3 # Manage a clamav installation
4 #
5 # == Sample Usage:
6 #
7 #   include clamav
8 #
9 class clamav {
10         package { [
11                         'clamav-daemon',
12                         'clamav-freshclam',
13                         'clamav-unofficial-sigs'
14                 ]:
15                         ensure => installed
16         }
17
18         $extra_groups = $::mta ? {
19                 'postfix' => 'amavis',
20                 default   => 'Debian-exim'
21         }
22
23         user { 'clamav':
24                 gid     => clamav,
25                 groups  => [$extra_groups],
26                 require => Package['clamav-daemon']
27         }
28
29         service { 'clamav-daemon':
30                 ensure  => running,
31                 require => Package['clamav-daemon']
32         }
33
34         service { 'clamav-freshclam':
35                 ensure  => running,
36                 require => Package['clamav-freshclam']
37         }
38
39         file { [
40                 '/var/lib/clamav/mbl.ndb',
41                 '/var/lib/clamav/MSRBL-Images.hdb',
42                 '/var/lib/clamav/MSRBL-SPAM.ndb',
43                 '/var/lib/clamav/msrbl-images.hdb',
44                 '/var/lib/clamav/msrbl-spam.ndb',
45         ]:
46                 ensure => absent,
47                 notify => Service['clamav-daemon']
48         }
49         file { '/var/lib/clamav/.nobackup':
50                 owner   => clamav,
51                 mode    => '0644',
52                 content => '',
53                 require => Package['clamav-daemon']
54         }
55         file { '/etc/clamav-unofficial-sigs.dsa.conf':
56                 require => Package['clamav-unofficial-sigs'],
57                 source  => [ 'puppet:///modules/clamav/clamav-unofficial-sigs.dsa.conf' ]
58         }
59         file { '/etc/clamav-unofficial-sigs.conf':
60                 require => Package['clamav-unofficial-sigs'],
61                 source  => [ 'puppet:///modules/clamav/clamav-unofficial-sigs.conf' ]
62         }
63
64 }