Thomas
2013-Sep-30 22:35 UTC
[Puppet Users] best practice for managing multiple stanzas within a config file?
What is the best way to manage multiple stanza within a config file? For a splunk configuration file (inputs.conf) I need to manage some thing like [monitor://var/log] blacklist = someRegularExpression whitelist = someOtherRegularExpression [monitor://var/lib/ourApp] There can be multiple monitor stanzas and each may or may not have a whitelist or blacklist. I haven''t found any thing on the forge or in this group regarding best practice for managing stanzas within a config file. I''ve tried a few different combinations of templates, concat and define and haven''t found a clean solution yet to construct the stanza. Any suggestions would be appreciated. Thanks! Thomas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Rahul Khengare
2013-Oct-01 05:21 UTC
[Puppet Users] Re: best practice for managing multiple stanzas within a config file?
Hi Thomas, You can make use of *augeas* resource type of puppet yo manage the config files. Refer following links for augeas resource type and project, http://docs.puppetlabs.com/references/latest/type.html#augeas http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Tuesday, October 1, 2013 4:05:20 AM UTC+5:30, Thomas wrote:> > What is the best way to manage multiple stanza within a config file? > > For a splunk configuration file (inputs.conf) I need to manage some thing > like > > [monitor://var/log] > blacklist = someRegularExpression > whitelist = someOtherRegularExpression > > [monitor://var/lib/ourApp] > > > There can be multiple monitor stanzas and each may or may not have a > whitelist or blacklist. > > I haven''t found any thing on the forge or in this group regarding best > practice for managing stanzas within a config file. > > I''ve tried a few different combinations of templates, concat and define > and haven''t found a clean solution yet to construct the stanza. > > Any suggestions would be appreciated. > > Thanks! Thomas > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Erik Dalén
2013-Oct-01 08:41 UTC
Re: [Puppet Users] best practice for managing multiple stanzas within a config file?
Looks like it is the inifile format, so take a look at https://github.com/puppetlabs/puppetlabs-inifile On 1 October 2013 00:35, Thomas <thomas.e.kenny@gmail.com> wrote:> What is the best way to manage multiple stanza within a config file? > > For a splunk configuration file (inputs.conf) I need to manage some thing > like > > [monitor://var/log] > blacklist = someRegularExpression > whitelist = someOtherRegularExpression > > [monitor://var/lib/ourApp] > > > There can be multiple monitor stanzas and each may or may not have a > whitelist or blacklist. > > I haven''t found any thing on the forge or in this group regarding best > practice for managing stanzas within a config file. > > I''ve tried a few different combinations of templates, concat and define > and haven''t found a clean solution yet to construct the stanza. > > Any suggestions would be appreciated. > > Thanks! Thomas > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >-- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.