Get Model Number and Serial number of Cisco devices using ios_facts module
---
- name: Define Parameters
hosts: XE
gather_facts: no
connection: network_cli
tasks:
- name: Get the facts
ios_facts:
gather_subset: all
- name: Display model and serial number
debug:
msg: "Model number of {{ ansible_net_hostname }} is {{ ansible_net_model }} and serial number is {{ ansible_net_serialnum
}}"
~
~
Comments
Post a Comment