summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2015-10-13 15:58:12 -0400
committerMicah <micah@leap.se>2015-10-13 15:59:10 -0400
commit43595b105a21aaccb41c4d9199d87b3dc2d48ab5 (patch)
treedd7939f6518902b0b7b443f2f603206efc46a3c5 /puppet
parent2c8de729a2a4213b8cb312bcb481695ae44f9a62 (diff)
Fix ordering of clamav resources, by requiring the package installation
as a pre-requisite Change-Id: Ic9c8cc6ccfb31ce5e56937a2d95de7974707c368
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/clamav/manifests/daemon.pp22
-rw-r--r--puppet/modules/clamav/manifests/freshclam.pp10
-rw-r--r--puppet/modules/clamav/manifests/milter.pp6
3 files changed, 23 insertions, 15 deletions
diff --git a/puppet/modules/clamav/manifests/daemon.pp b/puppet/modules/clamav/manifests/daemon.pp
index 9aebf9b0..bf232e2c 100644
--- a/puppet/modules/clamav/manifests/daemon.pp
+++ b/puppet/modules/clamav/manifests/daemon.pp
@@ -14,20 +14,23 @@ class clamav::daemon {
pattern => '/usr/sbin/clamd',
enable => true,
hasrestart => true,
- subscribe => File['/etc/default/clamav-daemon'];
+ subscribe => File['/etc/default/clamav-daemon'],
+ require => Package['clamav-daemon'];
}
file {
'/var/run/clamav':
- ensure => directory,
- mode => '0750',
- owner => clamav,
- group => postfix;
+ ensure => directory,
+ mode => '0750',
+ owner => clamav,
+ group => postfix,
+ require => [Package['postfix'], Package['clamav-daemon']];
'/var/lib/clamav':
- mode => '0755',
- owner => clamav,
- group => clamav;
+ mode => '0755',
+ owner => clamav,
+ group => clamav,
+ require => Package['clamav-daemon'];
'/etc/default/clamav-daemon':
source => 'puppet:///modules/clamav/clamav-daemon_default',
@@ -41,7 +44,8 @@ class clamav::daemon {
content => template('clamav/local.pdb.erb'),
mode => '0644',
owner => clamav,
- group => clamav;
+ group => clamav,
+ require => Package['clamav-daemon'];
}
file_line {
diff --git a/puppet/modules/clamav/manifests/freshclam.pp b/puppet/modules/clamav/manifests/freshclam.pp
index b9827ede..80c822a4 100644
--- a/puppet/modules/clamav/manifests/freshclam.pp
+++ b/puppet/modules/clamav/manifests/freshclam.pp
@@ -8,14 +8,16 @@ class clamav::freshclam {
enable => true,
name => clamav-freshclam,
pattern => '/usr/bin/freshclam',
- hasrestart => true;
+ hasrestart => true,
+ require => Package['clamav-freshclam'];
}
file_line {
'freshclam_notify':
- path => '/etc/clamav/freshclam.conf',
- line => 'NotifyClamd /etc/clamav/clamd.conf',
- notify => Service[freshclam];
+ path => '/etc/clamav/freshclam.conf',
+ line => 'NotifyClamd /etc/clamav/clamd.conf',
+ require => Package['clamav-freshclam'],
+ notify => Service['freshclam'];
}
}
diff --git a/puppet/modules/clamav/manifests/milter.pp b/puppet/modules/clamav/manifests/milter.pp
index 52ddaef1..e8a85e3f 100644
--- a/puppet/modules/clamav/manifests/milter.pp
+++ b/puppet/modules/clamav/manifests/milter.pp
@@ -14,6 +14,7 @@ class clamav::milter {
name => clamav-milter,
pattern => '/usr/sbin/clamav-milter',
hasrestart => true,
+ require => Package['clamav-milter'],
subscribe => File['/etc/default/clamav-milter'];
}
@@ -29,6 +30,7 @@ class clamav::milter {
mode => '0644',
owner => root,
group => root,
+ require => Package['clamav-milter'],
subscribe => Service['clamav-milter'];
'/etc/default/clamav-milter':
@@ -41,8 +43,8 @@ class clamav::milter {
content => template('clamav/whitelisted_addresses.erb'),
mode => '0644',
owner => root,
- group => root;
-
+ group => root,
+ require => Package['clamav-milter'];
}
}