Although there are no networking-specific Ansible conditionals, conditionals are fairly common in networking-related Ansible usage.
In networking, it's common to enable and disable ports. To have data pass through the cable, both ports at the ends of the cable should be enabled and result in a "connected" state (some vendors will use different names for this, but the idea is the same).
Let's suppose we have two Arista Networks EOS devices and we issued the ON status on the ports and need to wait for the connection to be up before proceeding.
To wait for the Ethernet4 interface to be enabled, we will need to add the following task in our playbook:
- name: Wait for interface to be enabled eos_command: commands: - show interface Ethernet4 | json wait_for: - "result[0].interfaces...