ansible / ansible.builtin / v2.16.0 / callback / junit write playbook output to a JUnit file. | "added in version" historical of ansible.builtin" Authors: unknownansible.builtin.junit (v2.16.0) — callback
pip
Install with pip install ansible-core==2.16.0
This callback writes playbook output to a JUnit formatted XML file.
Tasks show up in the report as follows: 'ok': pass 'failed' with 'EXPECTED FAILURE' in the task name: pass 'failed' with 'TOGGLE RESULT' in the task name: pass 'ok' with 'TOGGLE RESULT' in the task name: failure 'failed' due to an exception: error 'failed' for other reasons: failure 'skipped': skipped
output_dir: default: ~/.ansible.log description: Directory to write XML files to. env: - name: JUNIT_OUTPUT_DIR name: JUnit output dir task_class: default: false description: Configure the output to be one class per yaml file env: - name: JUNIT_TASK_CLASS name: JUnit Task class fail_on_change: default: false description: Consider any tasks reporting "changed" as a junit test failure env: - name: JUNIT_FAIL_ON_CHANGE name: JUnit fail on change fail_on_ignore: default: false description: Consider failed tasks as a junit test failure even if ignore_on_error is set env: - name: JUNIT_FAIL_ON_IGNORE name: JUnit fail on ignore test_case_prefix: default: <empty> description: Consider a task only as test case if it has this value as prefix. Additionally failing tasks are recorded as failed test cases. env: - name: JUNIT_TEST_CASE_PREFIX name: Prefix to find actual test cases version_added: '2.8' version_added_collection: ansible.builtin task_relative_path: default: none description: Configure the output to use relative paths to given directory env: - name: JUNIT_TASK_RELATIVE_PATH name: JUnit Task relative path version_added: '2.8' version_added_collection: ansible.builtin hide_task_arguments: default: false description: Hide the arguments for a task env: - name: JUNIT_HIDE_TASK_ARGUMENTS name: Hide the arguments for a task version_added: '2.8' version_added_collection: ansible.builtin replace_out_of_tree_path: default: none description: Replace the directory portion of an out-of-tree relative task path with the given placeholder env: - name: JUNIT_REPLACE_OUT_OF_TREE_PATH name: Replace out of tree path version_added: 2.12.3 version_added_collection: ansible.builtin include_setup_tasks_in_report: default: true description: Should the setup tasks be included in the final report env: - name: JUNIT_INCLUDE_SETUP_TASKS_IN_REPORT name: JUnit include setup tasks in report