FAQ
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Rahul Khengare at Oct 1, 2013 at 5:21 am
    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 [email protected].
    To post to this group, send email to [email protected].
    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 at Oct 1, 2013 at 8:41 am
    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 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 [email protected].
    To post to this group, send email to [email protected].
    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 [email protected].
    To post to this group, send email to [email protected].
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedSep 30, '13 at 10:35p
activeOct 1, '13 at 8:41a
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2023 Grokbase