A long-lived project that still receives updates
A puppet-lint plugin to check for deprecated hieras function usage. The legacy Hiera functions (hiera, hiera_array, hiera_hash, and hiera_include) should be replaced with lookup()
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 1.1, < 6.0
 Project Readme

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')