Ansible-pull fail tasks notifications ?

Hi,

One of the benefits of running Ansible in push mode is that you can see exactly when and what task have failed. I’m planning to use ansible in pull mode and I would like to know when a task have failed in pull mode by getting a notification.

Is that possible ?

Regards,
N.

You should look into using a callback plugin. There are a few examples at:

https://github.com/ansible/ansible/tree/devel/plugins/callbacks

Also see:

http://docs.ansible.com/developing_plugins.html#callbacks

Perhaps a better way would be to simplify your architecture.

Ansible tower has “provisioning callbacks”, which allow a node to phone out, say “go configure me now” and there are full details available via the GUI and REST API.

http://www.ansible.com/tower

This is a node raising it’s hand, so more like “pull-to-push”, though we are considering some nice integrations that would allow pure pull mode invocations in the future.

Ansible triggering ansible-pull is also a valid use case :slight_smile: