Forge Home

get_class_params

Retrieve the class names parameters and their values as a hash

9,419 downloads

9,419 latest version

3.8 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.0 (latest)
released Apr 23rd 2014

Start using this module

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

Add this module to your Puppetfile:

mod 'meltwater-get_class_params', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add meltwater-get_class_params
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install meltwater-get_class_params --version 0.1.0

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.

Download

Documentation

meltwater/get_class_params — version 0.1.0 Apr 23rd 2014

get_class_params

This Puppet function accepts a class name as argument and will retrieve the class names parameters and their values. Note that this only retrieves a the class definition parameters, not the parameters of an instance of the class.

An example of a use case is to generate a script that can handle all the parameters of an application managed by Puppet and use those variables to override the application configuration at runtime. This works out nicely with Docker, where you'd build a container using Puppet, but on deploying it to different environments you'd like to alter several parameters without rebuilding the container.

Usage

class_param_hash = get_class_params("myapp")

Support

Please log tickets and issues at our Projects site