Index: modules/adblockplus/manifests/log.pp |
diff --git a/modules/adblockplus/manifests/log.pp b/modules/adblockplus/manifests/log.pp |
index 0a8bf7cdbdacfccccba52e7b4ed909ce5c73e800..c1137b1c06dc95e20dc90cc20007b316c1fb3315 100644 |
--- a/modules/adblockplus/manifests/log.pp |
+++ b/modules/adblockplus/manifests/log.pp |
@@ -4,6 +4,9 @@ |
# |
# === Parameters: |
# |
+# [*ensure*] |
+# Whether associated resources are ment to be 'present' or 'absent'. |
+# |
# [*rotations*] |
# A hash of adblockplus::log::rotation $name => $parameter items |
# to set up in this context, i.e. via Hiera. |
@@ -17,27 +20,46 @@ |
# } |
# |
class adblockplus::log ( |
+ $ensure = 'present', |
$rotations = hiera('adblockplus::log::rotations', {}), |
) { |
include adblockplus |
- realize(File[$adblockplus::directory]) |
# Used as internal constants within adblockplus::log::* resources |
$directory = "$adblockplus::directory/log" |
- $group = 'log' |
+ $group = 'adm' |
$user = 'log' |
+ # Required on both log generating and log processing hosts |
+ class {'fluent': |
+ package => { |
+ ensure => $ensure ? { |
+ 'present' => '2.3.1-0', |
+ default => 'absent', |
+ }, |
+ provider => 'apt', |
+ }, |
+ user => { |
+ groups => [$group], |
+ shell => '/bin/sh', |
+ } |
+ } |
+ |
# Invoke realize(File[$adblockplus::log::directory]) when neccessary |
@file {$directory: |
ensure => 'directory', |
+ group => $group, |
+ mode => 0750, |
+ owner => 'root', |
require => File[$adblockplus::directory], |
} |
# Invoke realize(User[$adblockplus::log::user]) when necessary |
@user {$user: |
- ensure => 'present', |
+ ensure => $ensure, |
managehome => true, |
+ groups => [$group], |
} |
# See modules/adblockplus/manifests/log/rotation.pp |