summaryrefslogtreecommitdiff
path: root/roles/vm/guest/network/tasks/OpenBSD.yml
blob: 4357ea4e6dc3017eec8f8b9269e9ceaf3e6fe73a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
- 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