In this recipe, we will outline how to execute operational commands on Arista devices, and use the output to validate the state of the devices.
Retrieving operational data from Arista devices
Getting ready
eAPI must be enabled on the Arista devices in order to follow along with this recipe.
How to do it...
- Create a new playbook called pb_get_vlans.yml and populate it to execute the show vlan command on all leaf switches and store the output in a variable:
---
- name: " Play 1: Retrieve All VLANs from Arista Switches"
hosts: leaf
vars_files: vlan_design.yml...