Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move configuration of lookup merge behavior into Hiera lookup_options. #99

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Mohammed Naser <mnaser@vexxhost.com>
nexecook <ecook@nexcess.net>
Nick Erdmann <n@nirf.de>
Nick Jones <nick@dischord.org>
Robert Baumstark <robbaum@nait.ca>
Sandra Thieme <thieme.sandra@gmail.com>
Simon Murray <spjmurray@yahoo.co.uk>
Stuart Fox <sfox@xmatters.com>
Expand Down
10 changes: 10 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
lookup_options:
telegraf::inputs:
merge:
strategy: deep
merge_hash_arrays: true
telegraf::outputs:
merge:
strategy: deep
merge_hash_arrays: true
10 changes: 10 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: 5

defaults:
datadir: data
data_hash: yaml_data

hierarchy:
- name: "Defaults"
path: "common.yaml"
6 changes: 2 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,11 @@

$_outputs = lookup({
name => 'telegraf::outputs',
default_value => $outputs,
merge => deep
default_value => $outputs
})
$_inputs = lookup({
name => 'telegraf::inputs',
default_value => $inputs,
merge => deep,
default_value => $inputs
})

contain ::telegraf::install
Expand Down