Get Model Number and Serial number of Cisco devices using ios_facts module

 This ansible-playbook will get the 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

Popular posts from this blog

Anyconnect SSL-Client VPN with Self-signed Certificate on Cisco ASA

Filtering Routes in BGP using Route-maps and Prefix-list

Open Shortest Path First (OSPF)

IKEv2 IPsec Site-to-Site VPN configuration on Cisco ASA 8.4(x)

IPsec VPN as a Backup for Point-to-Point Link using IP SLA

Border Gateway Protocol (BGP)

Bypassing Proxy Server in Google Chrome

Cisco ASA Active/Active Failover Configuration

Cisco ASA Active/Standby Failover Configuration