includable

Provide the `includable()` function to test whether a class has been written and is in the path or not

Geoff Williams

geoffwilliams

5,389 downloads

4,125 latest version

3.9 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.1
  • 0.1.0
released Sep 12th 2018

Start using this module

Documentation

geoffwilliams/includable — version 0.2.0 Sep 12th 2018

Build Status

includable

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Description

Provide the includable() function to test whether a class has been written and is in the path or not

Usage

includable()

Test whether the class definition for the passed in class name is exists in the environment currently being evaluated.

For example, given:

/etc/puppetlabs/code/environments/production/modules/mock_profile/
└── manifests
    └── myprofile.pp


includable('mock_profile::myprofile') # true
includable('mock_profile::not_here') # false 

Classes will be resolved according the modulepath for the current environment according to Puppet. See function source code for exact implementation details

Limitations

  • Not supported by Puppet, Inc.

Development

PRs accepted :)

Testing

This module supports testing using PDQTest.

Test can be executed with:

bundle install
make

See .travis.yml for a working CI example