Skip to content

Instantly share code, notes, and snippets.

@ganeshrn
Created September 24, 2020 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganeshrn/f52b984a106247e6e3e843be4a3cc7c2 to your computer and use it in GitHub Desktop.
Save ganeshrn/f52b984a106247e6e3e843be4a3cc7c2 to your computer and use it in GitHub Desktop.
community.yang.generate_spec example
- name: generate spec from cisco iosxr interface config data and store it in file
community.yang.generate_spec:
file: "{{ playbook_dir }}/{{inventory_hostname}}/yang_files/Cisco-IOS-XR-ifmgr-cfg.yang"
search_path: "{{ playbook_dir }}/{{inventory_hostname}}/yang_files"
json_schema:
path: "{{ playbook_dir }}/{{ inventory_hostname }}/spec/Cisco-IOS-XR-ifmgr-cfg.json"
xml_schema:
path: "{{ playbook_dir }}/{{ inventory_hostname }}/spec/Cisco-IOS-XR-ifmgr-cfg.xml"
defaults: True
tree_schema:
path: "{{ playbook_dir }}/{{ inventory_hostname }}/spec/Cisco-IOS-XR-ifmgr-cfg.tree"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment