Modularise inputs_hash so we can declare them from more than one place!#73
Modularise inputs_hash so we can declare them from more than one place!#73Nuxij wants to merge 1 commit intohuit:masterfrom
Conversation
|
I would actually like to see this further modularized to support something like this: Where the target file, section headings and stanza values can be specified as inputs ($any_hash) to the defined resource. In other words, not just for inputs, but for any config file, any stanza. Puppet's inifile module may be more appropriate for this. |
|
I agree @TheHob, I will take a look at extending it further. I did consider the inifile module but I'd already completed my work by that point so I didn't bother. I think it will be a more succinct approach so I'll give that a look too. |
|
If I have the time I was thinking of doing something like this, which is why your PR caught my eye. I'm definitely a +1 for extending this the way you're headed. |
|
To give you an idea of where I was headed, here's what I'm using in my splunk puppet profile: YAML/hashes then look something like this: I'd like to meld the stanza-level stuff that you're doing in your PR (based on indexes.pp) with the source/target flexibility of the resource above. inifile would be icing on the cake. |
|
Ok I'll take a crack at it :) |
|
Very cool! Thanks guys!
|
This change moves away from the single-declaration inputs_hash, allowing us to define each input individually. It uses puppetlabs-concat to do it.
Old Style:
New Style: