Repository is archived
No commit activity in last 3 years
No release in over 3 years
Extends puppet-lint to ensure there are no explicit calls to hiera() in the class parameters.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 3.0, >= 1.1
 Project Readme

puppet-lint explicit Hiera class parameter lookup check

Extends puppet-lint to ensure there are no explicit calls to hiera() in the class parameters.

Actions Status

In our code base we would rather have a class lookup values for its parameters using Puppets automatic data binding functionality rather than scatter a number of direct, unpredictably name spaced, hiera calls throughout our manifests. This puppet-lint plugin helps us with that goal by finding any explicit hiera calls in a classes parameter section.

class no_explicit_lookups (
  $my_content = hiera('my::nested::key', 'baz')
) {
  file { '/tmp/foo':
    content => $my_content,
  }
}

Installation

To use this plugin add the following line to your Gemfile

gem 'puppet-lint-explicit_hiera_class_param_lookup-check'

and then run bundle install.

Usage

This plugin provides a new check to puppet-lint.

explicit hiera() lookup of my::sample::key

Other puppet-lint plugins

You can find a list of my puppet-lint plugins in the unixdaemon puppet-lint-plugins repo.

Author

Dean Wilson

License

  • MIT