puppetdb_rundeck

Expose puppetdb node data to rundeck
Craig Dunn

Craig Dunn

crayfishx

10,135 downloads

10,009 latest version

3.7 quality score

Version information

  • 0.0.2 (latest)
  • 0.0.1
released Jul 3rd 2019

Start using this module

Documentation

crayfishx/puppetdb_rundeck — version 0.0.2 Jul 3rd 2019

puppetdb_rundeck module

This module sets up puppetdb-rundeck to run under passenger and expose all host data in PuppetDB, incuding fact, to rundeck.

Class puppetdb_rundeck

Options

  • with_sinatra : Manage sinatra gem (default true)
  • approot : Application root
  • servername : Apache server name
  • port : Port (default 8888)
  • puppetdb_port : PuppetDB port (default 8080)
  • puppetdb_host : PuppetDB host (default localhost)
  • owner : Ownership of app files (apache user)
  • group : Group of app files (apache group)

puppetdb-rundeck

Based on the project https://github.com/martin2110/puppetdb-rundeck, modified to expose facts and add documentation.

Enhanced to expose facter data and use the new PuppetDB2 API https://github.com/sirloper/puppetdb2-rundeck

sinatra app that glues puppetdb and rundeck together.

set host_uri and port in the script

Installation

class { 'puppetdb_rundeck': }

Usage

Within your rundeck project configuration, add a Resource Model Source of type "URL Source", pointing at the machine that this web application is running on, port 8888 (or whatever you've configured it to use per the Apache configuration)

Example: URL Field: http://localhost:8888

Timeout: 90

Cache Results: Not checked

Any Jobs created under this Project should now have access to all nodes known by PuppetDB.

###Filtering This plugin exposes both classes and facts of all nodes known by PuppetDB to Rundeck. See the Rundeck documents on how to filter. Puppet facts are exposed as Rundeck "Attributes", so to filter by all RedHat-derived machines, you could enter "osfamily: RedHat" into the filter field and it will show only nodes that PuppetDB knows to have that fact with that value.

All known facts exposed to Rundeck can be viewed by looking at the "nodes" tab and expanding any of the nodes listed below. They are listed in the format of "Fact (attribute): Value". Note that this list can be quite long depending on your environment. This DOES include custom facts.

Credits

Maintainers

  • Craig Dunn (crayfishx)
  • Mark Cartwright (sirloper)

### Contributors

License

Licensed under the Apache 2.0 licence.