you might be hitting - http://projects.reductivelabs.com/issues/2309
Ohad On Thu, Feb 11, 2010 at 1:09 AM, Oded <oded.beno...@gmail.com> wrote: > I'm trying to use (possibly) undefined variables that are not in the > scope of my class in an erb template. > How do I combine this : > > <% if has_variable?("myvar") then %> > myvar has <%= myvar %> value > <% end %> > > with this : > <%= scope.lookupvar(myclass::myvar) %> > > > The idea is to get the iptables template to go through all the classes > assigned to a machine and add lines on relevant classes only(by > searching for a specific variable in that class),this way I will not > be forced to edit the iptables template/class every time another > module needs to change its iptable settings. > > Without checking for undefined variables my code looks like this : > > <% classes.each do |current_class| -%> > <% scope.lookupvar(current_class::iptables_input_tags) %> > <% end -%> > > > > Oded > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.