dellemc.os10.base_xml_to_dict – Operations for show command output convertion from xml to json format.

Note

This plugin is part of the dellemc.os10 collection (version 1.0.2).

To install it use: ansible-galaxy collection install dellemc.os10.

To use it in a playbook, specify: dellemc.os10.base_xml_to_dict.

Synopsis

  • Get the show system inforamtion of a Leaf-Spine.

Parameters

Parameter Choices/Defaults Comments
cli_responses
string / required
show command xml output

Examples

Copy below YAML into a playbook (e.g. play.yml) and run as follows:

#$ ansible-playbook -i inv play.yml
name: setup the plabook to get show command output in dict format
hosts: localhost
connection: local
gather_facts: False
vars:
  cli:
    username: admin
    password: admin
tasks:
- name: "Get Dell EMC OS10 Show output in dict format"
  os10_command:
    commands: "{{ command_list }}"
  register: show
- debug: var=show
- name: call to lib to get output in dict
  base_xml_to_dict:
    cli_responses: "{{ item }}"
  loop: "{{ show.stdout }}"

Authors

  • Senthil Kumar Ganesan (@skg-net)