Skip to content

eos_validate_state_reports

Note

Always use the FQCN (Fully Qualified Collection Name) arista.avd.eos_validate_state_reports when using this plugin.

This module is in preview mode

This module is not guaranteed to have a backwards compatible interface.

Generates validation reports for the eos_validate_state role

Synopsis

The arista.avd.eos_validate_state_reports module is an Ansible Action Plugin designed to generate validation reports from the test results produced by the ANTA test framework.

This plugin requires a JSON file for each host in the Ansible play, containing all test results. The JSON file is created automatically by the eos_validate_state_runner plugin and is saved in the test results directory with the following naming convention <inventory_hostname>-results.json.

The plugin offers the following functionalities:

  • It aggregates all test results from every host in the Ansible play and generates a CSV report.
  • It produces a detailed Markdown report with various sections presenting key statistics derived from the results.
  • The design allows for easy extension to support additional report formats in the future.

Parameters

Argument Type Required Default Value Restrictions Description
validation_report_csv bool optional True Indicates whether a CSV report should be generated.
validation_report_md bool optional True Indicates whether a Markdown report should be generated.
only_failed_tests bool optional False Determines if the generated reports should include only the failed tests.
csv_report_path str optional None The absolute path where the CSV report will be saved.
Required if validation_report_csv is set to True.
md_report_path str optional None The absolute path where the Markdown report will be saved.
Required if validation_report_md is set to True.
test_results_dir any optional None The directory where the test results JSON file for each host will be saved.
cprofile_file any optional None The filename for storing cProfile data, useful for debugging performance issues.
Be aware that enabling cProfile can affect performance, so use it only for troubleshooting.

Notes

  • Enabling the cProfile feature for performance profiling may impact the plugin's performance, especially in production environments.
  • Hosts with is_deployed is False are automatically skipped, and no test results are processed for these hosts.

See Also

Examples

- name: Generate validation reports from ANTA test results
  arista.avd.eos_validate_state_reports:
    csv_report_path: "/my_avd_project/reports/my-fabric-state.csv"
    md_report_path: "/my_avd_project/reports/my-fabric-state.md"
    validation_report_csv: true
    validation_report_md: true
    only_failed_tests: false
  delegate_to: localhost
  run_once: true

Authors

  • Arista Ansible Team (@aristanetworks)