[Puppet Users] Re: less drastic alternative to fail()?

joe
Wed, 12 Jun 2013 01:15:18 -0000

You can put the resources inside the class into a big if statement that
checks the vars and does a notify if the class can''t be applied.

I''ve seen this in a few modules.

On Tuesday, June 11, 2013 3:53:13 PM UTC-6, mpou...@afilias.info
wrote:
>
> I have a few cases of error checking to make sure parameters supplied to
> my classes and defined types where the no-success option is to run the
> fail() function with a meaningful error.  This seems to cause the entire
> agent run to fail as if the manifest couldn''t be generated.  Does
anyone
> know of an equivalent that would cause just that class to fail and stop
> processing (and obviously skip anything that depends on it) but allow the
> rest of the agent run to proceed as normal?
>
> Is that even desirable, or am I missing edge cases where that would break
> things?