francois / exports

A puppet face that queries puppetdb and returns the exported resources

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple PuppetDB wrapper

This is a puppet face that will display all exports in puppetdb from the command line

Usage

  1. Install the module into your modulepath
puppet node exports

An example use would be monitoring students checking into the puppet master in the puppet advanced class

while :; do clear; puppet node exports --highlight; sleep 2; done

or if you do not have --color in watch:

watch 'puppet node exports'

Example Usage

To query for all exported resources ( be aware there is a 20,000 limit by default )

puppet node exports
Name                                 Exports
puppet3.puppetlabs.vm                File[/tmp/production_puppet3.puppetlabs.vm_2]
puppet3.puppetlabs.vm                File[/tmp/production_puppet3.puppetlabs.vm]
puppet3.puppetlabs.vm                User[foooo]

To query for just user resources

puppet node exports user
Name                                 Exports
puppet3.puppetlabs.vm                User[foooo]

About

A puppet face that queries puppetdb and returns the exported resources


Languages

Language:Ruby 92.4%Language:Puppet 7.6%