Hi Puppet users,
Is there any convenient way to access a variable defined in a Puppet class
from within a custom fact?
I'm trying to reuse a Puppet variable within a fact definition, but
can't
find any way to look it up like I would do within an ERB template.
Example (fictional):
Facter.add(:tomcat_package) do
tomcat_package_name = scope.lookupvar(::tomcat::package_name)
setcode do
tomcat_package_name
end
end
I could export a FACTER_ environment variable instead, but that's not very
convenient in my case.
Thanks for the help
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/7afd731a-bd21-4f75-a812-a1e466202188%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.