August 2018
Intermediate to advanced
466 pages
10h 23m
English
We are now ready to incorporate this new parser script back into our playbook. We can now add the additional task of rendering the output with graph generation in cisco_discover_lldp.yml:
tasks: - name: Query for LLDP Neighbors ios_command: commands: show lldp neighbors provider: "{{ cli }}" register: output - name: show output debug: var: output - name: copy output to file copy: content="{{ output.stdout_lines }}" dest="./tmp/{{ inventory_hostname }}_lldp_output.txt" - name: Execute Python script to render output command: ./cisco_graph_lldp.py
This playbook will now include four tasks, covering the end-to-end process of executing the show lldp command on the Cisco devices, displaying the output on the screen, copying the ...
Read now
Unlock full access