By default Ansible 2.7 lists all network interfaces in the gathered facts. This list can be quite long, especially if Docker and Kubernetes (with an appropriate CNI like Weave Net) are used.
For some firewall rules I am only interested in the actual physical NICs. While e.g.
ansible_default_ipv4.interface lists me one of them, there might be more in some servers (e.g. DMZ / LAN).
How do I get a list of physical network adapters in an Ansible 2.7 playbook? This mechanism should work for Debian-based Linux distributions as well as RHEL.