I need to automate a Cisco switch using Ansible to scan all ports and apply a specific configuration to those that are down and do not have a transceiver. For example, I need to add these ports to VLAN 800 (creating it if it doesn’t exist) and set them to trunk mode.
Can anyone help me with this? My biggest challenge is not creating the VLAN but making Ansible automatically configure a down port that does not have a transceiver. This is important because some ports here are down but still have a transceiver connected with a client’s fiber link.