Suppose I have written a define
, and was able to trap the illegal argument combination. How to fail
the manifest with a message that comprises at least a resource that included our definition (or even better: a full calling stack)?
Something similar to the notice{'message': withpath => true }
Well you can, as it turns out, but it's not pretty.
It works by using Ruby in an
inline_template
to inspect the scope of the parser. If you are really going to use this, you should implement it in a parser function instead.1) Run puppet using
-d
:2) Use
fail('CP1')
in the puppet code3) Use
notify
results in
4) In my opinion the most important, TDD puppet using rspec-puppet.