tc-ansible-runner

TeamCity build runner plugin for running ansible-playbook. Adds 'Ansible' runner type to new build step creation dialog and 'Ansible Log' tab to build result pages.

Developed and tested with TeamCity 9.0.4

Usage Guide

Agent requirements

Installation

Follow the standard TeamCity plugin installation procedure:

  1. Download the latest release of ansible-runner-dist.zip from GitHub
  2. Shutdown the TeamCity server.
  3. drop the ansible-runner-dist.zip into /plugins directory
  4. Start the TeamCity server - the plugin will be available in the Plugins List in the Administration area.

Add new build step

  1. Add new build step to a build configuration
  2. Select 'Ansible' in the runner type drop-down
  3. Specify ansible-playbook executable name (if available on agent PATH) or absolute path in the 'Command' field, mandatory
  4. Specify playbook file in the 'Playbook' field, mandatory
  5. Specify inventory file in the 'Inventory' field, mandatory
  6. You can optionally pass other ansible-playbook arguments in the 'Options' field

View results

Open "Ansible Log" tab for a selected build. The report resembles ansible native colored output and adds filtering possibilities

Screenshot

Troubleshooting

The plugin generates hidden artifacts in .teamcity/ansible-run directory. Please consider attaching its content along with build log excerpts when reporting an issue on github

Missing features

Implementation overview

The plugin consists of several components:

Build

mvn clean package