title: Get Linux network interface name with Ansible?
body: <p>What is the best way to get the main network interface name for a Linux server with Ansible? This is often/usually <code>eth0</code> but we can't always assume this is the case and it would be better to identify this dynamically.</p>
  
  <p>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.</p>