On Friday, October 26, 2012 1:54:23 PM UTC-5, Abhijeet Rastogi wrote: > > > > 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 ... " >
You misunderstand. A defined type cannot set class variables, nor can one class set a different class's variables. Class variables must be set by the class to which they belong. Thereafter, their values can be referenced by anything, and in particular by your defined type. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/9bCYHGbDX2AJ. 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.