shut unused cisco switch interfaces

12 views
Skip to first unread message

Ahmed Aljawad

unread,
Oct 15, 2018, 1:51:11 PM10/15/18
to Ansible Project
Is there is any way i can loop on all the devices interfaces and shut all the Down Down ports ? 

Brad Van Orden

unread,
Oct 16, 2018, 7:52:50 AM10/16/18
to Ansible Project
I don't currently have any switches to test against, but I would think you can get the interface status with ios_facts with the ansible_net_interfaces giving you a hash of the interface status.  From that, you should be able to use ios_interface to mark it down.  ansible check of IOS interfaces gives a similar example.
Reply all
Reply to author
Forward
0 new messages