You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class nope {
$htpasswd_template = @(END)
<%- @htpasswd.keys.each do |x| -%>
<%- if @htpasswd[x].key?('password') -%>
<%= x %>:<%= @htpasswd[x]['password'] %>
<%- end -%>
<%- end -%>
END
file { $htpasswd_file:
ensure => file,
owner => 'root',
group => 'www-data',
mode => '0640',
content => inline_template($htpasswd_template)
}
}
And beautiful error:
/var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:181:in `block (2 levels) in check': undefined method `each' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:144:in `each'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:144:in `each_with_index'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:144:in `block in check'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:127:in `each'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/plugins/check_whitespace.rb:127:in `check'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/checkplugin.rb:21:in `run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/checks.rb:58:in `block in run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/checks.rb:56:in `each'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/checks.rb:56:in `run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint.rb:191:in `run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/bin.rb:59:in `block in run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/bin.rb:56:in `each'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/lib/puppet-lint/bin.rb:56:in `run'
from /var/lib/gems/2.1.0/gems/puppet-lint-2.1.1/bin/puppet-lint:7:in `<top (required)>'
from /usr/local/bin/puppet-lint:23:in `load'
from /usr/local/bin/puppet-lint:23:in `<main>'
The text was updated successfully, but these errors were encountered:
This is due to the lack of support for heredocs in the current release of puppet-lint. There is a fix for this in #650 which should be part of the next release.
Hello,
This syntax is based on https://docs.puppet.com/puppet/4.9/lang_template.html
Example code:
And beautiful error:
The text was updated successfully, but these errors were encountered: