On Fri 26 Oct 2012 10:15:23 PM IST, jcbollinger wrote:
On Friday, October 26, 2012 7:33:00 AM UTC-5, Abhijeet Rastogi wrote:
That leaves you at least two options. If you convert the singleton
definitions to classes, then you can access their variables via their
fully-qualified names. If you want to leave them as definitions then
you can store the needed values as variables of some class (as I think
you said you did), and then read those class variables where you need
them instead of trying to access the parameter values of the
defined-type instance.
How can save the values from defined resources to a variable of class?
When I tried doing that, I got error like "Cannot assign to variables
in other namespaces at ... "
It shouldn't. The big picture, in case it was not apparent in the
foregoing, is to pull the authoritative source of the needed values
out of the definition to some place accessible to everyone who wants
it. Common choices for such a place include variables of some class
and external data (perhaps accessed via hiera).
--
Cheers,
Abhijeet R
http://blog.abhijeetr.com
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.