Hi all, I have found the puppet docs for parameterised classes, and I have found the docs for templates, but I cannot find it documented anywhere on how to expose a parameter from a parameterised class inside a template. I am trying to embed the parameter name using <% parameter_name %> inside the template, but all I get in the final file is the empty string, and no clear indication as to why. Is there a set of docs anywhere that explains how to do this? Regards, Graham -- -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Nov 28, 2011, at 9:20 AM, Graham Leggett wrote:> Hi all, > > I have found the puppet docs for parameterised classes, and I have found the docs for templates, but I cannot find it documented anywhere on how to expose a parameter from a parameterised class inside a template. > > I am trying to embed the parameter name using <% parameter_name %> inside the template, but all I get in the final file is the empty string, and no clear indication as to why. > > Is there a set of docs anywhere that explains how to do this?There is nothing special about using class parameters in templates. Class parameters are bound to variables just like everything else. Perhaps it''s because you are using <% parameter_name %> rather than <%= parameter_name %> ? -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, 28 Nov 2011 16:20:13 +0200 Graham Leggett wrote:> Hi all,Hi, [...]> I am trying to embed the parameter name using <% parameter_name %>maybe: <%= parameter %> [...]> Regards, > GrahamHTH, Arnau -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.