On Thursday, July 3, 2014 5:21:33 AM UTC-5, Jose Luis Ledesma wrote:
>
> Hi,
>
> Does exist some way to force a error while applying the catalog? We
> need to check some facts vs configuration and force an error if doesnt'
> match, so we could have a report from the node in the puppetdb with the
> failed state. (we cannot use a compilation/evaluation error because it
> doesn't report to the puppetdb)
>
> Currently we use this ugly workaround:
>
> exec {'dummy exec to force an error':
> path => ['/bin'],
> }
>
> Is there any better solution?
>
>
Not really. You could write a custom type that always fails, but that
seems a lot of trouble, and not necessarily any better. I'd write that
exec a little prettier, though:
exec { 'Intentional Failure':
command => '/bin/false'
}
John
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/0e1f576b-5ca7-4819-bb82-4eb39b3156f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.