Running arbitrary commands on Nokia devices
In this recipe, you will execute operational commands on Nokia devices and use the output to validate that the client1 server is online and that the routes/MAC address are being learned across the fabric. This recipe differs from the previous use of the Nokia get module, simply to show flexibility and how to gather information using a more common CLI interface that a network engineer is familiar with:
- Create a new playbook called
pb_get_mactable.ymland populate it to execute theshow network-instance vrf-1 bridge-table mac-table allcommand on all leaf switches and store the output in a variable:root@cookbook-lab:~/cookbook-lab/chapters/ch06# vi pb_get_mactable.yml --- - name: “Retrieve Learned MACs from Leaf Switches” hosts: “leafs” (1) vars_files: - srl_secret.yml tasks: - name: “Learned...