Try with something like: > > <%- if role == "fast" -%> > <%- line = "The line you want to print" -%> > <%- end -%> > <%= line -%> > > > > A bit to quick there. For this to work you have to feed the template with > the variable. You can just feed $role with a default value. eg default.. > > The thing is I have a lot of node definitions, and every node includes this class. I don't want to have to edit every node definition in order to get that line in just a couple of nodes.
Maybe change the class so it concats another template/file onto the end of it if $role is set, although I'm not quite sure how to do that yet without experimentation. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---