Quoted Booleans


Boolean values (true and false) behave differently when quoted ('true' and 'false'), which can lead to a fair bit of confusion. As a general rule, you should never quote booleans. This is not a style issue, rather a common mistake.

What you have done

  file { '/tmp/foo':
    purge => 'true',
  }

What you should have done:

  file { '/tmp/foo':
    purge => true,
  }

Disabling the check

To disable this check you can add --no-quoted_booleans-check to your puppet-lint command line.

$ puppet-lint --no-quoted_booleans-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

PuppetLint.configuration.send('disable_quoted_booleans')