--- - name: generate network interface configs loop: "{{ network_cooked.interfaces }}" loop_control: loop_var: interface label: "{{ interface.name }}" copy: dest: "/etc/hostname.{{ interface.name }}" content: | inet {{ interface.address | ipaddr('address') }} {{ interface.address | ipaddr('netmask') }} {% for route in interface.static_routes | default([]) %} !route add -net {{ route.destination }} {{ route.gateway }} {% endfor %} ## TODO: configure default gateway - for now we rely on installer to do the right thing