O'Reilly logo

Learning Ansible by Ramesh Raithatha, Madhurranjan Mohaan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Callback plugins

We now proceed to callback plugins. One of the features that Ansible provides is a callback mechanism. You can configure as many callback plugins as required. These plugins can intercept events and trigger certain actions. The section on alerting that we will cover after this section shows you how to use these plugins to make sure you get the right sort of feedback. Let's see a simple example where we just print the run results at the end of the playbook run as part of a callback and then take a brief look at how to configure a callback.

We will rerun the build_agent role from the last chapter for this example; the build agent is already configured and we're running Ansible against it. This is shown in the following screenshot: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required