A puppet-lint plugin to check the idempotency attributes on exec resources.
$ gem install puppet-lint-exec_idempotency-check
gem 'puppet-lint-exec_idempotency-check', :require => false
When using exec
resource it is highly recommended to take care on idempotency. That means, that we need a check to verify if the command should be run again or is required to run at all.
The following attributes control this behavior:
creates
: checks if a directory or file existsonlyif
orunless
: execute checks to verify idempotencyrefreshonly
: only run the exec if it is triggered by another reosurce
exec { '/bin/apt update':
}
exec { '/bin/apt update':
refreshonly => true,
}
To disable this check, you can add --no-exec_idempotency-check
to your puppet-lint command line.
$ puppet-lint --no-exec_idempotency-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_exec_idempotency')
TBD
To make a new release, please do:
- update the version in the gemspec file
- Install gems with
bundle install --with release --path .vendor
- generate the changelog with
bundle exec rake changelog
- Check if the new version matches the closed issues/PRs in the changelog
- Create a PR with it
- After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages