Skip to content

Instantly share code, notes, and snippets.

Created December 14, 2020 05:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
validate admin state criteria
- name: validate interface for admin state
data: "{{ nxos_pyats_show_interface['parsed'] }}"
- "{{ lookup('file', './criterias/nxos_show_interface_admin_criteria.json') | from_json }}"
engine: ansible.utils.jsonschema
ignore_errors: true
register: result
- name: print the interface names that does not satisfy the desired state
msg: "{{ item['data_path'].split('.')[0] }}"
loop: "{{ result['errors'] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment