Can you check a setting set in puppet.conf from within a module

12 views
Skip to first unread message

Peter Foley

unread,
Apr 24, 2012, 5:14:14 PM4/24/12
to puppet...@googlegroups.com
Hi List,

In a module that I am developing I would like to do different things depending on if storeconfigs is true or false.

Is there any way to:

    if $storeconfigs == true {
      # Use stored config values
    } else {
      # Use non stored config values
    }

Thanks,

Peter.

Gary Larizza

unread,
Apr 24, 2012, 6:56:17 PM4/24/12
to puppet...@googlegroups.com
Hey Peter,

You should be able to do $settings::storeconfigs to get that value.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.



--

Gary Larizza
Professional Services Engineer
Puppet Labs

Peter

unread,
Apr 25, 2012, 3:30:21 AM4/25/12
to Puppet Users
Hi Gary,

Thank you very much! I thought it may have been a scoping issue!

Peter.

Dan Carley

unread,
May 4, 2012, 3:08:30 AM5/4/12
to puppet...@googlegroups.com
On 25 April 2012 08:30, Peter <pe...@ifoley.id.au> wrote:
Hi Gary,

Thank you very much!  I thought it may have been a scoping issue!

Peter.

On Apr 25, 8:56 am, Gary Larizza <g...@puppetlabs.com> wrote:
> Hey Peter,
>
> You should be able to do $settings::storeconfigs to get that value.

Speaking of scope, you probably want to use $::settings::storeconfigs
Reply all
Reply to author
Forward
0 new messages