shut unused cisco switch interfaces

Is there is any way i can loop on all the devices interfaces and shut all the Down Down ports ?

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.