dellemc.os10.vlt_validate – Validate the vlt info, raise an error if peer is not in up state
From Get docs
Ansible/docs/2.11/collections/dellemc/os10/vlt validate module
dellemc.os10.vlt_validate – Validate the vlt info, raise an error if peer is not in up state
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.vlt_validate
.
Synopsis
- Troubleshoot the show vlt info and raise an error if peer is not up.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
intended_vlt_pairs list / elements=string / required |
intended vlt pair intput to verify with actual | |
show_system_network_summary list / elements=string / required |
show system summary output | |
show_vlt list / elements=string / required |
show vlt output |
Examples
Copy below YAML into a playbook (e.g. play.yml) and run as follows:
#$ ansible-playbook -i inv play.yml
name: show system Configuration
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: "Get Dell EMC OS10 Show run vlt"
os10_command:
commands:
- command: "show running-configuration vlt | grep vlt-domain"
provider: "{{ hostvars[item].cli }}"
with_items: "{{ groups['all'] }}"
register: show_run_vlt
- set_fact:
output_vlt: "{{ output_vlt|default([])+ [{'host': item.invocation.module_args.provider.host, 'inv_name': item.item,
'stdout_show_vlt': item.stdout.0}] }}"
loop: "{{ show_run_vlt.results }}"
- debug: var=output_vlt
- name: "Get Dell EMC OS10 Show vlt info"
os10_command:
commands:
- command: "show vlt {{ item.stdout_show_vlt.split()[1] }} | display-xml"
provider: "{{ hostvars[item.inv_name].cli }}"
with_items: "{{ output_vlt }}"
register: show_vlt
- set_fact:
vlt_out: "{{ vlt_out|default([])+ [{'host': item.invocation.module_args.provider.host, 'inv_name': item.item, 'show_vlt_stdout': item.stdout.0}] }}"
loop: "{{ show_vlt.results }}"
register: vlt_output
- name: call lib to convert vlt info from xml to dict format
base_xml_to_dict:
cli_responses: "{{ item.show_vlt_stdout }}"
with_items:
- "{{ vlt_out }}"
register: vlt_dict_output
- name: "Get Dell EMC OS10 Show system"
import_role:
name: os10_fabric_summary
register: show_system_network_summary
- name: call lib to process
vlt_validate:
show_vlt : "{{ vlt_dict_output.results }}"
show_system_network_summary: "{{ show_system_network_summary.msg.results }}"
intended_vlt_pairs: "{{ intended_vlt_pairs }}"
register: show_vlt_info
Authors
- Senthil Kumar Ganesan (@skg-net)
© 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/vlt_validate_module.html