Note
This plugin is part of the dellemc.os10 collection (version 1.1.1).
To install it use: ansible-galaxy collection install dellemc.os10
.
To use it in a playbook, specify: dellemc.os10.base_xml_to_dict
.
Parameter | Choices/Defaults | Comments |
---|---|---|
cli_responses string / required | show command xml output |
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 }}"
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/dellemc/os10/base_xml_to_dict_module.html