auto lo iface lo inet loopback auto eth0 iface eth0 inet static address {{ ansible_host }}/{{ netmask }} routes-static {{ gateway }},default via {{ gateway }} {% if ip6 is defined %} iface eth0 inet6 static address {{ ip6 }}/{{ netmask6 }} gateway {{ gateway6 }} pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra {% endif %}