Forge Home

puppeteer

A variety of tasks using Puppet.

15,353 downloads

7,349 latest version

4.6 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.8 (latest)
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4 (deleted)
  • 0.1.3
  • 0.1.2
  • 0.1.1 (deleted)
  • 0.1.0 (deleted)
released Mar 15th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x
  • Puppet >= 5.3.2 < 6.0.0
  • , , ,
Tasks:
  • apply
  • certificate_info
  • classfile
  • env_cache
  • external_fact
  • features
  • providers
  • and 1 more. See all tasks

Start using this module

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

Add this module to your Puppetfile:

mod 'WhatsARanjit-puppeteer', '0.1.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add WhatsARanjit-puppeteer
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install WhatsARanjit-puppeteer --version 0.1.8

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

WhatsARanjit/puppeteer — version 0.1.8 Mar 15th 2018

Puppeteer Build Status

Table of Contents

  1. Overview
  2. Tasks

Overview

A variety of tasks using Puppet.

Tasks

puppeteer::apply

Run inline Puppet code

puppet task run puppeteer::apply --nodes 'node1'  code='notify { $fqdn: }'

Run Puppet code from a manifest in noop mode

puppet task run puppeteer::apply --nodes 'node1'  manifest='/tmp/fqdn.pp' --noop

Run inline Puppet code with custom modulepath on agent

puppet task run puppeteer::apply --nodes 'node1'  code='notify { $settings::modulepath: }' modulepath='/path/to/custom'

puppeteer::external_fact

Create a datacenter fact in datacenter.txt

puppet task run puppeteer::external_fact --nodes 'node1' fact=datacenter value=us-east

NOTE: If no file is specified, $fact.txt is used.

Create a role fact in server.yaml

puppet task run puppeteer::external_fact --nodes 'node1' fact=role value=default file=server.yaml

Remove an existing fact from config.json

puppet task run puppeteer::external_fact --nodes 'node1' fact=repo_server action=remove file=config.json

NOTE: Keys will be overwritten, not merged.

puppeteer::certificate_info

Retrieve certificate information

puppet task run puppeteer::certificate_info --nodes 'node1'

...results in:

Started on node1 ...
Finished on node node1
tte : 5.0 years
issued : 2017-10-03 18:30:27 UTC
issuer : Puppet Enterprise CA generated on puppet2017.3.0.puppetlabs.vm at +2017-09-27 12:03:26 +0000
serial : 5
expires : 2022-10-03 18:30:27 UTC
subject : node1
tte_raw : 156285193.94213384

Find certificates that will expire within a specified interval

puppet task run puppeteer::certificate_info --nodes 'node1' threshold=6y

...results in:

Started on node1 ...
Failed on node1
Error: Task finished with exit-code 2
threshold : Expiring before 6y!
expires : 2022-10-03 18:30:27 UTC
serial : 5
tte : 5.0 years
issuer : Puppet Enterprise CA generated on puppet2017.3.0.puppetlabs.vm at +2017-09-27 12:03:26 +0000
issued : 2017-10-03 18:30:27 UTC
tte_raw : 156285079.43708673
subject : node1

Your threshold can be specified as a number followed by a unit from [s,m,h,d,y] or as a parseable time string like 10/20, 2022-10-20, or Oct 20 2022. See ruby docs for more details. Nodes with certificates due to expire in your specified interval will result in a failure with exit code 2. In order to report a success even if the certificate is due to expire in your specified interval, use the fail parameter.

puppet task run puppeteer::certificate_info --nodes 'node1' threshold=6y fail=no_fail

...results in:

Started on node1 ...
Finished on node node1
tte : 5.0 years
issued : 2017-10-03 18:30:27 UTC
issuer : Puppet Enterprise CA generated on puppet2017.3.0.puppetlabs.vm at +2017-09-27 12:03:26 +0000
serial : 5
expires : 2022-10-03 18:30:27 UTC
subject : node1
tte_raw : 156270228.94399956
threshold : Expiring before 6y!

puppeteer::features

Look up the Puppet features on each system.

puppet task run puppeteer::features --nodes 'node1'

puppeteer::providers

Look up the providers for a given type.

puppet task run puppeteer::providers --nodes 'node1' type=user

Contributed by: Laura Macchi

puppeteer::classfile

Look up all applied classes from last Puppet agent run (classfile.txt).

puppet task run puppeteer::classfile --nodes 'node1'

puppeteer::resources

Look up all managed resources from last Puppet agent run (resources.txt).

puppet task run puppeteer::resources --nodes 'node1'

puppeteer::env_cache

Clear environment cache.

puppet task run puppeteer::env_cache --nodes 'node1' environment=production