Testing for Ansible

For the time I have been using Ansible, I can not recall using a unittest like tool to test a Playbook. For the most part, the Playbooks are utilizing modules that were tested by the module developers.

Ansible provides unit tests for their library of modules. Unit tests in Ansible are currently the only way to drive tests from Python within Ansible's continuous-integration process. The unit tests that are run today can be found under /test/units (https://github.com/ansible/ansible/tree/devel/test/units).

The Ansible testing strategy can be found in the following documents:

Get Mastering Python Networking - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.