What does Puppet manage on a node?

Last year I wrote a tool to parse the localconfig.yaml from Puppet 0.24 and display a list of resources and classes. This script failed when 0.25 came out, I’ve updated it for 0.25 support.

The yaml cache has some added features in 0.25 so now I can also show the list of tags on a node, output would be:

# parselocalconfig.rb /var/lib/puppet/client_yaml/catalog/fqdn.yaml
Classes included on this node:
        fqdn
        common::linux
        <snip>
 
Tags for this node:
        fqdn
        common::linux
        <snip>
 
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
 
        <snip>

You can get the script that supports both 0.24 and 0.25 here.

Tags: , ,

7 Responses to “What does Puppet manage on a node?”

  1. Nigel Kersten 27. Feb, 2010 at 18:48 #

    Nice work. I have a similar script, but one thing I ran into was that this approach will only parse the default config file, and I have the odd situation where that isn’t the case.

    Have you thought about supporting a –config option?

    We should perhaps join forces and get this into the distro, as I’ve taken a slightly different approach where you can request not only all resources, but just restrict it to –files or –pkgs or –services etc.

  2. R.I. Pienaar 27. Feb, 2010 at 19:12 #

    Yeah have thought of adding –config, will do.

    Limiting it is interesting, didn’t think of it, wrote it for people who don’t particularly care for cli options so they’d never use it :)

  3. duritong 28. Feb, 2010 at 14:18 #

    Yeah, would be nice to have that upstream!

  4. Al 02. Mar, 2010 at 23:20 #

    Very very nice.
    +1 for upstream

    It would be great to see this integrated with Foreman or Dashboard (*hint* to the relevant ones :)

  5. saurabh verma 17. May, 2010 at 15:27 #

    Hi ,
    This is nice script and very useful for me :)

Trackbacks/Pingbacks

  1. Puppet localconfig parser – 20100303 « www.devco.net by R.I.Pienaar - 03. Mar, 2010

    [...] had some good feedback on my previous post about the puppet localconfig parser, have implemented the requested features so here's a new [...]

  2. Puppet localconfig parser – 20100330 « www.devco.net by R.I.Pienaar - 30. Mar, 2010

    [...] For background about what this is see my original post: What does Puppet manage on a node? [...]

Leave a Reply