Coverage Tool for Ansible.
- Ansible >=2.4
Install this Ansible plugin with:
$ pip install ansible-coverage-callback
Be sure to whitelist the plugin in your ansible.cfg
:
[defaults]
callback_whitelist = coverage
You may skip task or tasks from coverage report by adding skip_coverage
tag:
---
- name: Test handler
command: whoami
when:
- test_var == False
tags:
- skip_coverage
- Imported handlers has no tags, so they can't be skipped
- There is some magic hacks for skipping Molecule's system playbooks
- Tasks from non imported files are not counted