In implementing callback methods, they have to adhere to the callback
interface.

The `v2_runner_on_failed` method is defined as:

https://github.com/ansible/ansible/blob/4260b71cc77b7a44e061668d0d408d847f550156/lib/ansible/plugins/callback/__init__.py#L506

As such, your plugin has to accept the same arguments as defined there.

On Thu, Oct 6, 2022 at 10:06 AM Stefan Coussens <[email protected]>
wrote:

> Hi,
>
> I am trying to write a callback plugin. It is working quite well when all
> tasks succeed. However when a playbook has a failed task I get:
>
>
> *v2_runner_on_failed() got an unexpected keyword argument*
> *'ignore_errors'*
>
> Code:
>
> def v2_runner_on_failed(self, result):
>   pass
>
> I see a lot of plugins that have an extra argument , ignore_errors=False.
> But I can't figure out what this setting does. I think I need to have:
>
> def v2_runner_on_failed(self, taskResult, ignore_errors=True):
>
> I just want my playbook to continue and not stop because of the callback
> plugin.
>
>
> Can anyone point me into the right direction
>
> kind regards,
>
> Stefan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" 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/ansible-project/87aae087-700a-4fa9-8cfa-ce7b25c02886n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/87aae087-700a-4fa9-8cfa-ce7b25c02886n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" 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/ansible-project/CAD8N0v-cmaaKkour0tm95iKME7BA9dq_e%2Btmi0%2B6Cq0h22rk%2BA%40mail.gmail.com.

Reply via email to