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

Trevor Vaughan
Wed, 12 Jun 2013 02:40:59 -0000

Unfortunately, putting in a notify would not fail the class and skip
dependencies, it would instead succeed.

In general, you would want to use ''fail'' to fail the compile
since, in this
case, you have a typo that you need to fix.

However, I have also wanted a way for a soft-fail of some sort that would
do what you are asking. In these cases, I tend to write custom types since
this will do exactly what you are asking (at the expense of having to write
the type).

Trevor


On Tue, Jun 11, 2013 at 9:15 PM, joe <lavaman@gmail.com> wrote:

> 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?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscribe@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com

-- This account not approved for unencrypted proprietary information --