Forge Home


Foreman smart class parameter data binding terminus for Puppet 3+


11,017 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.0 (latest)
released Jan 18th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'domcleal-foreman_data_binding', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add domcleal-foreman_data_binding
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install domcleal-foreman_data_binding --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.



domcleal/foreman_data_binding — version 0.1.0 Jan 18th 2013


Data binding terminus for Puppet 3+ that uses Foreman's smart class parameters feature to resolve class parameters. Drop-in replacement for Hiera.

Requires the foreman_param_lookup plugin to be installed on your Foreman server.

Why would you do this?

In a Foreman 1.1 setup, classes are added to a host or hostgroup and Foreman provides the list of classes and their parameters to Puppet through the ENC. However, if those classes then include others, the data has to be provided by the first set of classes - which can make for lots of duplication of parameter lists.

Puppet 3 adds data binding support with Hiera, so if a class is included, it uses the data binding implementation to look up all of the parameters, e.g.

# this gets added to the host in Foreman
class role::webserver {
  include httpd

class httpd($document_root, $user, $group) {
  # ...

Puppet 3 will look up httpd::document_root, httpd::user and httpd::group automatically, without us needing to supply them in the role class.

When classes are imported in Foreman, you can create flexible matcher rules that allow a hierarchy of lookups to resolve class parameters.


First install the foreman_param_lookup plugin on your Foreman server.

On your puppetmaster, install this module:

puppet module install domcleal/foreman_data_binding

or copy this directory to your modulepath.

Edit lib/puppet/indirector/foreman.rb and set the $foreman_url value, e.g. to http://foreman/.

In your puppetmaster's /etc/puppet/puppet.conf, set:

data_binding_terminus = foreman

Restart the puppetmaster.


In Foreman, under Puppet Classes, ensure your classes have been imported.

Select a class, choose a parameter from the left hand list and edit the hierarchy and matchers. More info:


Copyright (c) 2013 Red Hat Inc. See LICENSE.