Forge Home

exports

Query all nodes puppetdb exports

140,937 downloads

95,027 latest version

5.0 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

  • 1.0.1 (latest)
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Feb 2nd 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , , , , ,
Tasks:
  • exports

Start using this module

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

Add this module to your Puppetfile:

mod 'zack-exports', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add zack-exports
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install zack-exports --version 1.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.

Download

Documentation

zack/exports — version 1.0.1 Feb 2nd 2018

Simple PuppetDB wrapper

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

Task Usage

Requirements

This module is compatible with Puppet Enterprise and Puppet Bolt.

Puppet Enterprise Tasks

With Puppet Enterprise 2017.3 or higher, you can run this task from the console or the command line.

Here's a command line example where we are checking for the exported Host resources from the Puppet master, master.corp.net:

[abir@workstation]$ puppet task run exports resources=Host --nodes master.corp.net

Starting job ...
New job ID: 247
Nodes: 1

Started on master.corp.net ...
Finished on node master.corp.net
  STDOUT:
    Name                                 Exports
    master.corp.net                      Host[master.corp.net]

Job completed. 1/1 nodes succeeded.
Duration: 2 sec

Bolt

With Bolt, you can run this task on the command line like so:

bolt task run exports resources=Host --nodes master.corp.net

Parameters

  • resources: Filter the query to just a particular resource

Module 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 --resources user
Name                                 Exports
puppet3.puppetlabs.vm                User[foooo]