dodevops / ansible-teamcity-callback

An Ansible callback plugin to output suitable for TeamCity
MIT License
21 stars 5 forks source link
ansible ansible-playbook output python teamcity

Ansible Callback Plugin for Teamcity

Introduction

This Ansible [callback plugin]() formats the output of an Ansible playbook, so that it can be better interpreted by TeamCity.

Why?

Because Ansible logs in Teamcity look like this:

Log without this plugin

With this plugin in place, they look like this:

Log with this plugin

All plays and tasks are nicely put into their own blocks allowing TeamCity to collapse them and calculate the different times.

Usage

You have different options of using this plugin:

Set the following environment variable to use the plugin:

export ANSIBLE_STDOUT_CALLBACK=teamcity

Then run your playbook.