[Puppet Users] How to increment variable in erb template ?

AnOnJoe
Tue, 24 Apr 2012 13:38:28 -0000

Hi'',

I''m looking for a way to increment variable in template (erb file).

I tried this, but it didn''t work

Compteur <%= compteur %>
> <% compteur = compteur + 1 %>
> Compteur <%= compteur %>
>

I''ve got this error :

> Error 400 on SERVER: Failed to parse template test/test.erb: undefined
> method `+'' for nil:NilClass
>

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit