Forge Home


Utility Bolt plan for use in a Puppet development workflow


4,393 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Apr 26th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • apply_class

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'reidmv-apply_class', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add reidmv-apply_class
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install reidmv-apply_class --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



reidmv/apply_class — version 0.1.1 Apr 26th 2019


Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality


The apply_class module provides a utility plan for applying a Puppet class to a target node, and reviewing the output cleanly.


If working with a Bolt project containing a Puppetfile (such as a control-repo), start by deploying all the referenced modules into the project directory.

bolt puppetfile install -v

Then, use the apply_class plan to compile a catalog for the target

bolt plan run apply_class classname=apply_class::test

Full example

[reidmv@halcyon:~/control-repo/] % ls
data  manifests  modules  scripts  site-modules  LICENSE  Puppetfile  bolt.yaml  environment.conf  hiera.yaml
[reidmv@halcyon:~/control-repo/] % bolt puppetfile install -v
Using Puppetfile '/Users/reidmv/control-repo/Puppetfile'
Updating module /Users/reidmv/control-repo/modules/inifile
Updating module /Users/reidmv/control-repo/modules/stdlib
Updating module /Users/reidmv/control-repo/modules/concat
Updating module /Users/reidmv/control-repo/modules/apply_class
Successfully synced modules from /Users/reidmv/control-repo/Puppetfile to /Users/reidmv/control-repo/modules
[reidmv@halcyon:~/control-repo/] % bolt plan run apply_class --target="local://localhost" classname="apply_class::test"
Starting: plan apply_class
Starting: install puppet and gather facts on local://localhost
Finished: install puppet and gather facts with 0 failures in 6.57 sec
Starting: apply catalog on local://localhost
Finished: apply catalog with 0 failures in 14.18 sec
2019-04-26T17:09:28.875230000-07:00 NOTICE Puppet this is a test
2019-04-26T17:09:28.877054000-07:00 NOTICE /Stage[main]/Apply_class::Test/Notify[this is a test]/message defined 'message' as 'this is a test'
2019-04-26T17:09:28.878121000-07:00 NOTICE Puppet of apply_class
2019-04-26T17:09:28.879459000-07:00 NOTICE /Stage[main]/Apply_class::Test/Notify[of apply_class]/message defined 'message' as 'of apply_class'
2019-04-26T17:09:28.880491000-07:00 NOTICE Puppet have a wonderful day!
2019-04-26T17:09:28.881761000-07:00 NOTICE /Stage[main]/Apply_class::Test/Notify[have a wonderful day!]/message defined 'message' as 'have a wonderful day!'
2019-04-26T17:09:28.890619000-07:00 NOTICE Puppet Applied catalog in 0.02 seconds
"changed" on local://localhost: changed: 3, failed: 0, unchanged: 0 skipped: 0, noop: 0
Finished: plan apply_class in 20.89 sec
[reidmv@halcyon:~/control-repo/] %