Forge Home


Foreman with Puppetdb


9,993 latest version

0.1 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.0.1 (latest)
released Dec 10th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'neillturner-foreman_puppetdb', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add neillturner-foreman_puppetdb
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install neillturner-foreman_puppetdb --version 0.0.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.



neillturner/foreman_puppetdb — version 0.0.1 Dec 10th 2013


This is the foreman_puppetdb module. This is a complex and brittle install of Foreman, Puppet, and Puppetdb.

This is very centos/redhat specific and a very much a first version.

The idea is to quickly bring up a foreman, puppet, puppetdb configured to use stored configs on one server,, suitable for production use.

It uses apache and passenger instead of the internal puppet webbrick webserver as this scales better for production. Configurations are stored in puppetdb so that dynamic configuration of Nagios can be done.

The module assumes you have:

  1. Installed puppet version 3: rpm -ivh yum install puppet
  2. Set Security Enhanced Linux to disabled. 3 Installed httpd yum install httpd

Use puppet apply to install the module.

  1. Installs various pre-requisities.
  2. Installs Foreman, postgresql, puppetmaster, and passenger using the foreman install as per Foreman quickstart
  3. Install passenger and configures it to run puppet under the apache httpd server.
  4. Installs puppetdb to run under postgresql.
  5. Finally need to test a. On a client yum install puppet puppet agent -t --environment=production --logdest /var/log/puppet/agent.log -v -d b. Sign Certificate Go to Foreman logon as admin pw change me. Go to More > Configuration > Smart Proxies and click certificates for puppetmaster-example-com Click sign for client. c. Back on client run again at it will work puppet agent -t --environment=production --logdest /var/log/puppet/agent.log -v -d

RERUNNING --------- Unfortunatelty the foreman-installer does not seem to be idempotent so to rerun the install

  1. On the first to run the /root/ script to create a clean server to re-install. 
  2. On the test client run the following to clean and reinstall puppet: 
         yum remove puppet
         rm -rf /etc/puppet              
         rm -rf /var/lib/puppet  (so the SSL certificate will be recreated).
         yum install puppet 

DEBUGGING ---------

  1. The Puppetdb can be accesses via: psql -h -U puppetdb -W puppetdb password: puppetdb
  2. You can check the configurations via: puppet agent --environment=production --configprint all| egrep "dbadapter|storeconfig"