Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ninech/puppet-lint-use_ensure_packages-check
https://github.com/ninech/puppet-lint-use_ensure_packages-check
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ninech/puppet-lint-use_ensure_packages-check
- Owner: ninech
- Created: 2017-01-09T09:22:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T07:00:04.000Z (almost 8 years ago)
- Last Synced: 2024-10-31T14:22:06.138Z (about 2 months ago)
- Language: Ruby
- Size: 12.7 KB
- Stars: 0
- Watchers: 19
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# puppet-lint use_ensure_packages check
[![Build Status](https://travis-ci.org/ninech/puppet-lint-use_ensure_packages-check.svg?branch=master)](https://travis-ci.org/ninech/puppet-lint-use_ensure_packages-check)
[![Gem Version](https://badge.fury.io/rb/puppet-lint-use_ensure_packages-check.svg)](https://badge.fury.io/rb/puppet-lint-use_ensure_packages-check)## Installation
To use this plugin, add the following like to the Gemfile in your Puppet code
base and run `bundle install`.```ruby
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'])
```