Low commit activity in last 3 years
Extends puppet-lint to ensure no hiera functions are called and that lookups are only used in class parameters.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 13.0.0
~> 3.9.0
~> 1.0
~> 0.80.0
~> 0.18.0

Runtime

>= 1.1, < 5.0
 Project Readme

puppet-lint hiera functions check

Gem Version

Installation

To add the provided lint checks into a module utilizing the PDK:

  1. Add the following to the .sync.yml in the root of your module
    ---
    Gemfile:
      optional:
        ':development':
          - gem: 'puppet-lint-hiera'
  2. Run pdk update from the root of the module
  3. pdk validate will now also use the lint checks provided by this plugin

Usage

This plugin provides two new checks to puppet-lint

no_hiera

--fix support: No

This check raises an error if the hiera() function is used.

error: hiera() function call. Use lookup() instead.

lookup_in_class

--fix support: No

This check raises an error if the lookup() function is used within a class body.

error: lookup() function call found in class.

lookup_in_class_params

--fix support: No

This check raises an error if the lookup() function is used inside a classes parameters.

error: lookup() function call found in class params.

lookup_in_profile_class

--fix support: No

This check raises an error if the lookup() function is used within a profile body.

error: lookup() function call found in profile class. Only use in profile params.