puppet-lint-hiera_functions-check

License CI RubyGem Version RubyGem Downloads

A puppet-lint plugin to check for deprecated hiera() function usage

Installing

From the command line

$ gem install puppet-lint-hiera_functions-check

In a Gemfile

gem 'puppet-lint-hiera_functions-check', :require => false

Checks

Hiera function used

Usage of the hiera() function is deprecated

What you have done

$key = hiera('key')
$key = hiera_array('key')
$key = hiera_hash('key')
$key = hiera_include('key')

What you should have done

$key = lookup('key')
$key = lookup('key', {merge => unique})
$key = lookup('key', {merge => hash})
$key = lookup('key', {merge => unique}).include

Disabling the check

To disable this check, you can add --no-hiera_functions-check to your puppet-lint command line.

$ puppet-lint --no-hiera_functions-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_hiear_functions')