<% nagios_conf_dirs.each |dir| -%>
cfg_dir=<%= dir %>
<% end -%>
Anybody have any idea why that would cause a syntax error in a template?
According to debug mode on puppetmasterd it is....
err: compile error
(erb):18: syntax error
_erbout.concat "cfg_dir"; _erbout.concat(( dir ).to_s); _erbout.concat
"\n"
^
(erb):19: syntax error
end
^
--
Peter L. Berghold
Owner, Shark River Technical Solutions LLC
--
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 Thu, 14 Oct 2010 18:37:01 -0400, Peter Berghold wrote:> > <% nagios_conf_dirs.each |dir| -%> > cfg_dir=<%= dir %> > <% end -%> > > Anybody have any idea why that would cause a syntax error in a template? > > According to debug mode on puppetmasterd it is.... > > err: compile error > (erb):18: syntax error > _erbout.concat "cfg_dir"; _erbout.concat(( dir ).to_s); _erbout.concat "\n" > ^ > (erb):19: syntax error > end > ^ >You''re missing the "do" after each: <% nagios_conf_dirs.each do |dir| -%> cfg_dir=<%= dir %> <% end -%> -- Jacob Helwig
Am 15.10.2010 00:42, schrieb Jacob Helwig:> <% nagios_conf_dirs.each do |dir| -%> > cfg_dir=<%= dir %> > <% end -%>I would rather prefer the "for" notation in templates, since it is easier to read when interspersed with other text: | <% for dir in nagios_conf_dirs -%> | cfg_dir=<%= dir %> | <% end -%> Regards, Christian -- Dipl.-Inf. Christian Kauhaus <>< · kc@gocept.com · systems administration gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 11 · fax +49 345 1229889 1 Zope and Plone consulting and development -- 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.