Note
This plugin is part of the dellemc.os10 collection (version 1.1.1).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
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/latest/collections/dellemc/os10/base_xml_to_dict_module.html