ansible
Module Contents
- ansible.ANSIBLE_GALAXY_COLLECTIONS
- ansible.install_deps()
Download and install any external dependencies required for Ansible to run.
- ansible.report_from_output(lines, to_file='ansible-playbook.log', failure='fail')
Process ‘ansible-playbook’ output, hide useless info, and report important info.
All ansible-playbook output is written to ‘to_file’ (and streamed to ATEX when available). The log file is pre-registered via register_log() so it is preserved even if the test errors out (similar to ATEX crash-safety). Callers should not pass ‘to_file’ to results.add_log() or results.report_and_exit(logs=…) as it is already registered with the main test result.
The ‘failure’ argument dictates what status to use for failing playbook results. The default ‘fail’ is sensible for uses where the playbook is the test itself. If it is not, set it to ‘error’.
Return True whether there was at least one ‘failed’ module check. This can be used by the caller to differentiate between ansible-playbook exit code 2 due to failed checks vs the same exit code due to bad args, etc. (False && exit code 2 means a task-unrelated problem.)