summaryrefslogtreecommitdiff
path: root/roles/vm/network/templates/netplan.yaml.j2
blob: 7725f15f8854c0944531864de29fca5b617ccfc3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    {{ network.primary.interface }}:
      addresses:
        - {{ (network.primary.ip + '/' + network.primary.mask) | ipaddr('address/prefix') }}
{% if 'prefix6' in network.primary %}
        - {{ network.primary.prefix6 }}
      gateway6: {{ network.primary.gateway6 }}
{% endif %}
      gateway4: {{ network.primary.gateway }}
      accept-ra: false