This is very useful! Thanks for sharing!
On Friday, June 24, 2011 3:03:34 AM UTC-4, Nan Liu wrote:
On Thu, Jun 23, 2011 at 7:46 AM, Patrick wrote:
Is there anywhere that lists the available built-in variables aside
from facter and
Pretty sure that's it. You can dump all variables in scope via:
notice(inline_template("<%= scope.to_hash %>"))

This isn't perfect, but should give you the subset: (since facter
value such as uptime changes, and in agent/master mode this is totally
wrong unless it's on the same system)
notice(inline_template("<%= (scope.to_hash.to_a -
Facter.to_hash.to_a).to_yaml %>")

This obviously will be different if the notice is in a module, a
class, a define, $caller_module, $module_name would only be present if
the notice is in the appropriate location.
I'm referring to variables like $title and $name, which are mentioned
but are there any others?
Anyhow this is what I got back using puppet apply (trimming some extras):

- - clientversion
- 2.6.4 (Puppet Enterprise 1.0)
- - clientcert
- pe-master.localdomain
- - title
- main
- - name
- main
- - environment
- production


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
postedFeb 7, '13 at 10:08p
activeFeb 7, '13 at 10:08p

1 user in discussion

Roadtest: 1 post



site design / logo © 2021 Grokbase