'Get Linux network interface name with Ansible?
What is the best way to get the main network interface name for a Linux server with Ansible? This is often/usually eth0 but we can't always assume this is the case and it would be better to identify this dynamically.
We are configuring the firewall with Ansible so we need to be able to issue the interface name as part of the commands that we are using.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
