A puppet-lint plugin to check that classes are included by their absolute name.
$ gem install puppet-lint-appends-check
gem 'puppet-lint-appends-check', :require => false
Including a class by a relative name might lead to unexpected results.
$ssh_users = ['myself', 'someone']
class test {
$ssh_users += ['someone_else']
}
$ssh_users = ['myself', 'someone', 'someone_else']
# OR
$ssh_users = hiera('ssh_users')
There is not one way to properly fix this type of style error, so running puppet-lint's fix feature will not have any effect.
To disable this check, you can add --no-appends-check
to your puppet-lint command line.
$ puppet-lint --no-appends-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_appends')