Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Script to parse the Puppet local catalog and show the resources in it.
Ruby
branch: master

This branch is 3 commits behind ripienaar:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.markdown
parse.rb
parselocalconfig.rb

README.markdown

What is this?

A script that reads catalogs from Puppet versions 0.24, 0.25 and 2.6 and displays the contents.

Two versions are provided, one standalone and one that ties into the Puppet 2.6 application structure. There is a bug in Puppet that prevents applications from being copied out with pluginsync so to use the application plugin you need to copy it into your ruby libdir but you then can just use 'puppet parse' with the same arguments as outlined below.

Usage

# parselocalconfig.rb /var/lib/puppet/client_yaml/catalog/fqdn.yaml
Classes included on this node:
        fqdn
        common::linux
        
 
Tags for this node:
        fqdn
        common::linux
        
 
Resources managed by puppet on this node:
        yumrepo{centos-base: }
                defined in common/modules/yum/manifests/init.pp:24
 
        file{/root/.ssh: }
                defined in common/modules/users/manifests/root.pp:20
 
        

Various options exist to limit the output:

   --limit [TYPE] - only shows resources of TYPE like Package
   --no-classes   - don't show any classes
   --no-tags      - don't show any tags
   --help         - shows help

Contact

You can contact me on rip@devco.net or follow my blog at www.devco.net I am also on twitter as ripienaar

Something went wrong with that request. Please try again.