In this recipe, we will outline how to collect device facts from Cisco devices with Ansible. This information includes the serial number, IOS version, and all the interfaces on the devices. Ansible executes several commands on managed IOS devices in order to collect this information.
Collecting IOS device facts
Getting ready
The Ansible controller must have IP connectivity with the managed network devices, and SSH must be enabled on the IOS devices.
How to do it...
- Create a new playbook called pb_collect_facts.yml in the same ch2_ios folder with the following information...