Hey, Henrik. Argh, the language guide. Anyway, I was about to say $title and $name were the only ones, but then I remembered $module_name and $caller_module_name (http://docs.puppetlabs.com/guides/faq.html#are- there-variables-available-other-than-those-provided-by-facter). Those MIGHT be what the language guide was referring to. I'm pretty sure it wasn't referring to metaparameters, although any metaparameters declared for a defined type instance ARE available as variables inside the definition.
I don't know if the module_name variables can be parameter defaults; you'd have to check. I forget what happens prior to 2.6.5 so you'll have to check that too, but I THINK $name/$title caught the value they had in the containing scope, which would be the name of the class where the defined resource was declared. (Often "main" when you're testing one-off manifests.) On Oct 19, 11:36 am, Henrik Lindberg <[email protected]> wrote: > The documentation says: > "Defined types have a number of built-in variables available, including > $name and $title, which are set to the title of the resource when it is > declared." > > How can I find out what the other "built-in variables" are? > Is it the meta parameters? > > I Understand that since 2.6.5 it is possible to refer to $title and > $name as default values of declared parameters - can the "other built-in > variables" also be used this way, or are $name/$title special in this > respect? > > What happened in < 2.6.5 ? Was the result depending on what the value of > $name/$title was in the scope where it was declared - or did it just fail? > > Need this to correctly validate variable references in Geppetto > (https://github.com/cloudsmith/geppetto/issues/210) > > Regards > - henrik -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
