rodjek/puppet-lint — Issue #36: single quotes in a manifest causes an exception
Author: aknapp
Created: 2011-11-11 07:55:41+00:00
State: open

I ran this on one of my manifests, and got this error:

/var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint/plugins/check_strings.rb:13:in `slurpstring': wrong number of arguments (3 for 1) (ArgumentError)
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint/plugins/check_strings.rb:13:in `convert'
from /usr/lib/ruby/1.8/puppet/parser/lexer.rb:360:in `munge_token'
from /usr/lib/ruby/1.8/puppet/parser/lexer.rb:428:in `scan'
from /usr/lib/ruby/1.8/puppet/parser/lexer.rb:257:in `fullscan'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint/plugins/check_classes.rb:5:in `test'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint/plugin.rb:37:in `run'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint.rb:60:in `run'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint.rb:59:in `each'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/../lib/puppet-lint.rb:59:in `run'
from /var/lib/gems/1.8/gems/puppet-lint-0.1.7/bin/puppet-lint:52
from /var/lib/gems/1.8/bin/puppet-lint:19:in `load'
from /var/lib/gems/1.8/bin/puppet-lint:19

I tracked it down to this statement:
$nfs_master_host = $domain ? {$
'domain.external' => '1.1.1.1',$
'domain.internet' => '2.2.2.2',$
}$

When I switched the single quotes to double quotes ("), it fixed the problem.