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

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

Issue 29338675: Issue 3694 - Introduce class adblockplus::log::processor and role logprocessor (Closed)
Patch Set: Issue 3694 - Addressing feedback from code-review Created March 21, 2016, 4:44 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 | « hiera/roles/logprocessor.yaml ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/adblockplus/manifests/log/processor.pp
diff --git a/modules/adblockplus/manifests/log/processor.pp b/modules/adblockplus/manifests/log/processor.pp
new file mode 100644
index 0000000000000000000000000000000000000000..8b8899f05fa56279b4997590ab09daefce2a6bac
--- /dev/null
+++ b/modules/adblockplus/manifests/log/processor.pp
@@ -0,0 +1,38 @@
+# == Class: adblockplus::log::processor
+#
+# A mixin class that defines a set of additional Hiera keys for Fluentd,
+# each of which is examined using function hiera_hash(). This allows for
+# fine-tuning the setup via YAML, but will only be supported as long as
+# Fluentd is actually the sofware behind adblockplus::log resources. This
+# is unlikely to change though, or at least there are no such plans yet.
+#
+# === Hiera:
+#
+# [*fluent::configs*]
+# A hash of zero or more $title => $parameters items for the definition
+# of fluentd::config resources via YAML.
+#
+# [*fluent::gems*]
+# A hash of zero or more $title => $parameters items for the definition
+# of fluent_gem resources via YAML.
+#
+# [*fluent::plugins*]
+# A hash of zero or more $title => $parameters items for the definition
+# of fluent::plugin resources via YAML.
+#
+# === Examples:
+#
+# # Does not imply inclusion of any other adblockplus::* manifest
+# include adblockplus::log::processor
+#
+class adblockplus::log::processor {
+
+ $fluent_configs = hiera_hash('fluent::configs', {})
+ create_resources('fluent::config', $fluent_configs)
+
+ $fluent_gems = hiera_hash('fluent::gems', {})
+ create_resources('fluent::gem', $fluent_gems)
+
+ $fluent_plugins = hiera_hash('fluent::plugins', {})
+ create_resources('fluent::plugin', $fluent_plugins)
+}
« no previous file with comments | « hiera/roles/logprocessor.yaml ('k') | modules/private-stub/hiera/hosts.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld