FAQ
I have a custom package provider. However within the ruby code, I need
access a custom facter fact (which has the path to the executable which
handles the package installation).

I tried doing lookupvar('bin_path' ) but it complained "undefined method
`lookupvar'"

So how do I reference a facter fact from within a custom provider?

Thanks in advance.

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Stefan Schulte at Mar 22, 2013 at 6:40 pm

    On Fri, 22 Mar 2013 10:29:22 -0700 (PDT) Jist Anidiot wrote:

    I have a custom package provider. However within the ruby code, I
    need access a custom facter fact (which has the path to the
    executable which handles the package installation).

    I tried doing lookupvar('bin_path' ) but it complained "undefined
    method `lookupvar'"

    So how do I reference a facter fact from within a custom provider?

    Thanks in advance.
    to get the value of a fact (no matter if it is a custom fact or a
    buildin fact) use `my_path = Facter.value(:bin_path)`

    -Stefan


    --
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 22, '13 at 5:29p
activeMar 22, '13 at 6:40p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Stefan Schulte: 1 post Jist Anidiot: 1 post

People

Translate

site design / logo © 2022 Grokbase