User:Djmitche/Puppet Stuffz

From MozillaWiki
Jump to: navigation, search

Commands

puppet --debug foo.pp

executes foo.py. Can supply facts with FACTER_varname or even --factpath; can load specific classes with --loadclasses=, and that classfile can be created with --classfile in puppetd

Testing

You can test a set of manifests without a server:

  • clone the manifests
  • cp secrets.pp.template secrets.pp (if necessary)

In the root of the clone,

 puppet --verbose  --noop --modulepath=modules/ mv-production.pp

(or whichever file contains the necessary node definition)

You can also test a particular class e.g.,

 puppet --verbose  --noop --modulepath=modules/ -e 'include nagios'

This may only work with 0.25.0 and up, but hey, it's useful for masters at least.

Classfile

puppetd dumps /var/lib/puppet/classes.txt, giving the set of classes applied to this node.

RI's blog posts

Tools

Other Links