Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/adblockplus/manifests/log.pp

Issue 29338680: Issue 3825 - Replace Logstash setup with Fluentd (Closed)
Patch Set: Created March 18, 2016, 6:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/adblockplus/files/log/import.py ('k') | modules/adblockplus/manifests/log/master.pp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « modules/adblockplus/files/log/import.py ('k') | modules/adblockplus/manifests/log/master.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld