No commit activity in last 3 years
No release in over 3 years
A puppet-lint plugin to check that contains if ! defined (Package statements.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

puppet-lint use_ensure_packages check

Build Status Gem Version

Installation

To use this plugin, add the following like to the Gemfile in your Puppet code base and run bundle install.

gem 'puppet-lint-use_ensure_packages-check'

Usage

This plugin provides a new check to puppet-lint.

use_ensure_packages

--fix support: yes

This check will raise a error for constructs like the following.

  if ! defined(Package['foo']) {
    package { 'foo': }
  }

And offer you the option to rewrite it to use ensure_packages with the --fix option. This would be transformed into the following.

  ensure_packages(['foo'])