> Try some of the tips at:
>
> http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl
>
One thing you should be careful of is that the syntax check will not
catch all mistakes. For example let's say you have an entry like this.
file { "dir_colors" :
path => "/etc/DIR_COLORS",
content => template("bash/dir_colors"),
}
If you make a mistake in specifying the template file (say you typed
"bash/dir_colours" instead) the syntax check isn't going to catch
that. What will catch it is generating a catalog so I wrote the
following script which works for me but you might have to modify it to
work for you.
---------
#! /usr/bin/env ruby
exit_code = 0
Dir[File.expand_path(File.dirname(__FILE__)) +
'/manifests/nodes/*'].each do |file|
node= File.basename(file, '.pp')
puts "Processing #{node}"
`puppetmasterd --compile #{node}`
exit_code = $? unless exit_code != 0
end
exit exit_code
-----------
This code will actually run through your config and generate a catalog
for each of my nodes. I find this check to be more thorough but it
could take a while if you have a lot of nodes so you might want to
modify it to only check the set you have worked on.
Note: This means you have to install puppermaster on your workstation.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---