Skip to content

ohadlevy/manitest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Manitest compiles a manifest using another hosts facts

Usage: ./manitest.rb

Manitest compiles a manifest using another hosts facts.

-v, --verbose                    Output more information
-d, --debug                      Output the full puppet debug
-e, --environment                Override node environment
-t, --tmpdir DIR                 Where to write temp files - defaults to /tmp
-n, --node FILE                  YAML node file to use
-c, --class CLASSA,CLASSB        node classes to use
-h, --help                       Display this screen

example runs:

verbose mode

$ ./manitest.rb -n /var/lib/puppet/yaml/node/hostname.yaml -v
Setting up environment: development
Setting up facts:
The manifest compilation for hostname is OK
$ echo $?
0

debug mode

$  ./manitest.rb -n /var/lib/puppet/yaml/node/hostname.yaml -d -e global_puppetmaster
Setting up environment: global_puppetmaster
Setting up facts:
puppetmaster=>puppet
...
< a lot of facts info here >
/usr/bin/puppet --config /tmp/.tmp_puppet.conf --certname hostname --debug /tmp/.tmp_node.pp 2>&1
< a lot of puppet debug messages here >
Could not find class xyz in namespaces zzz at /etc/puppet/modules/zzz/manifests/init.pp:7 on node hostname
The manifest compilation for hostname is broken

known limitations

It seems that this script will work only on the same architecture, as puppet internally tries to load the provides automatically, I'm not sure if its possible to run a Solaris manifest on a Linux host.

When not using external nodes, the class information must be specified manually with the -c option - e.g. ./manitest -c ntp::server,ssh::client etc.

About

scripts to automate puppet manifest compliation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages