Yes, I think that's a great idea. The code we use also compiles catalogs for every node, but doesn't go as far as to tell us the differences before and after for every node. If you have skeptical managers worried that Puppet could break every node in your system, your idea would give you a very high level of confidence that such things could never happen.If I may ask, how do you actually compile the catalog though. Are you using puppet master --compile or calling the internals directly? Is your code publicly available?
require 'spec_helper'
['myhost1, 'myhost2'].each do |fqdn|
hostname, node_environment, n, node_datacentre =
/(.*)\.(.*)([12])\..*\.(.*)\..*\.mydomain.com/.match(fqdn).captures
node_stream = node_environment + n
describe fqdn do
let(:facts) {{
:hostname => hostname,
:otherfacts => otherfacts,
}}
it {
should compile.with_all_deps
}
end
end