The ansible-lint to JUnit converter.
via pip:
pip install ansible-lint-junit
via pip:
pip install ansible-lint-junit --upgrade
- You can run
ansible-lint
on your playbook(s) and redirect output to pipeansible-lint playbook.yml -p --nocolor | ansible-lint-junit -o ansible-lint.xml
- You can use a temporary file to store the output of
ansible-lint
. After that runansible-lint-junit
and pass generated file to itansible-lint -p --nocolor your_fancy_playbook.yml > ansible-lint.txt ansible-lint-junit ansible-lint.txt -o ansible-lint.xml
- If there are any lint errors, full JUnit XML will be created.
- If there are no errors, empty JUnit XML will be created, this is for
i.e. Bamboo JUnit parser plugin compatibility.
It will break build if XML is missing or incorrect, and there is really no way of generating XML with "PASSED" tests in case of linter.
The ansible-lint-junit project is distributed under the [MIT] license.