blob: d97b183b6bf52e0488ea36115f7f4dccb31dd873 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
---
- name: generate network interface configs
loop: "{{ network.interfaces }}"
loop_control:
loop_var: interface
label: "{{ interface.name }}"
copy:
dest: "/etc/hostname.{{ interface.name }}"
content: |
inet {{ interface.address | ansible.utils.ipaddr('address') }} {{ interface.address | ansible.utils.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
|