Gathering facts
Ansible includes a number of specific fact-gathering modules for network devices, and these may well be useful for running conditional tasks, or simply reporting back data about your devices. The device-specific fact modules are not run at the start of the playbook run since, at this stage, Ansible does not know what sort of device it is communicating with. Thus, we must tell it to gather the facts for each device as appropriate.
There is no specific facts module for Cumulus Linux switches (although, since they are based on Linux, the standard host facts can still be gathered). Taking forward the example of our IOS device, we would specifically run this facts module in our playbook based on some unique key in our inventory. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access