Syntax error in directories.erb after upgrade to puppetlabs-apache 1.9.0 from 1.6.0

asked 2016-05-11 09:02:29 -0500

Hi,

we recently upgarded our puppetlabs-apache module from 1.6.0 to 1.9.0. When I trigger a Puppet run now, I get the following exception/stack trace:

Debug: template[/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb]: Bound template variables for /tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb in 0.00 seconds
Error: Could not run: /tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:62: syntax error, unexpected tIDENTIFIER, expecting keyword_when
...]['enforce'].downcase ; _erbout.concat "\r\n"
...                               ^
/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:63: syntax error, unexpected keyword_when, expecting keyword_end
;  when 'all','none','any' then ; _erbout.concat "\r\n    <Require"
       ^
/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:63: syntax error, unexpected ',', expecting keyword_end
;  when 'all','none','any' then ; _erbout.concat "\r\n    <Require"
              ^
/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:63: syntax error, unexpected ',', expecting keyword_end
;  when 'all','none','any' then ; _erbout.concat "\r\n    <Require"
                     ^
/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:63: syntax error, unexpected keyword_then, expecting keyword_end
;  when 'all','none','any' then ; _erbout.concat "\r\n    <Require"
                               ^
/tmp/puppet/infrastructure-puppet-forge-modules/modules/apache/templates/vhost/_directories.erb:324: syntax error, unexpected keyword_end, expecting end-of-input
;  end ; _erbout.concat "\r\n"
      ^

The according code line is here. When I change the syntax according to this Gist it works again.

I'm using Puppet Agent Version 3.6.2. Is there any problem with this version of Puppet with the multiline case/when statement?

Thanks, Wolfgang

edit retag flag offensive close merge delete