Henrik, Tristan, thanks for your replies!
I've added "parser = future" on both master and agent, inside [main], and also I'm still using "--parser future", just in case.
You both were right, and I'd use "notify" instead of "notice" in that snippet.
I think that parser option is working now, but it's breaking a template that was working until now. So here I go again for your help, as I don't think that the parser should be doing this.
Here is the output of the new error:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template sudo/sudoers.erb:
Filepath: /etc/puppet/environments/integration/modules/sudo/templates/sudoers.erb
Line: 42
Detail: undefined method `each' for nil:NilClass
on node test01
Here is the line 42 of the template file:
....<snip>...
DEPLOY ALL = NOPASSWD: /usr/bin/service apache2 restart
DEPLOY ALL = NOPASSWD: /usr/bin/service php5-fpm restart
<% @server_roles.each do |role| -%> <====== line 42
<% if role == "testuser" %>
DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 restart
DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 start
DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 stop
...<snip>....
I've tried with "each @server_roles" too, but still broken.
May be enabling the extra features of the parser, puppet tries to do something else with the word "each", but I'm totally lost here.
Is this behavior expected? Is there any way that I can debug any deeper on this?
Again, thanks in advance for any help.
Cheers,
Martin