Skip to content
Snippets Groups Projects
Commit 6a624b35 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

networkd: Configure Network.LinkLocalAddressing

parent f6a2a9fe
No related branches found
No related tags found
1 merge request!8networkd: Configure Network.LinkLocalAddressing
Pipeline #4930 passed
......@@ -10,11 +10,13 @@
# networkd:
# - type: 'dhcp'
# link_local_addressing: "no"
# - type: 'static'
# address: '10.10.10.10/24'
# gateway: '10.10.10.1'
# - type: 'routed'
# identifier: 'file-name'
# link_local_addressing: "ipv4"
# interfaces:
# - 'eth0'
# addresses:
......@@ -76,6 +78,7 @@ networkd_bond_vlans:
name: storage
bridge: false
address: 10.10.10.10/24
link_local_addressing: "no"
- id: 42
name: public
bridge: true
......
......@@ -6,6 +6,9 @@ DHCP=ipv4
{% if networkd_ipfwd %}
IPForward=yes
{% endif %}
{% if network.link_local_addressing is defined %}
LinkLocalAddressing={{ network.link_local_addressing }}
{% endif %}
{% for custom in network.custom|default([]) %}
[{{ custom.category }}]
......
......@@ -10,6 +10,9 @@ Name={{ network.interfaces|default([network.interface])|join(' ') }}
Address={{ addr }}
{% endfor %}
{% endif %}
{% if (network.link_local_addressing|default(none)) is not none %}
LinkLocalAddressing={{ network.link_local_addressing }}
{% endif %}
{% for server in network.nameservers|default(nameservers) %}
DNS={{ server }}
{% endfor %}
......
......@@ -2,5 +2,6 @@
'interface': item.1.interface|default(networkd_interface|default(ansible_default_ipv4.interface)),
'addresses': item.1.addresses|default([item.1.adress|default(networkd_address)]),
'gateway': item.1.gateway|default(networkd_gateway),
'link_local_addressing': item.1.link_local_addressing|default(None)
} %}
{% include "20-wired-routed.network.j2" %}
......@@ -6,3 +6,4 @@ Name={{ bond.bond|default(networkd_bond) }}
VLAN=vl-{{ vlan.name }}
{% endfor %}
BindCarrier={{ bond.interfaces|default(networkd_bond_devices)|join(' ') }}
LinkLocalAddressing=no
......@@ -2,6 +2,7 @@
'interface': 'vmbr-' + item.name,
'addresses': [item.address] if item.address is defined else [],
'nameservers': [],
'routes': [{'gateway': item.gateway}] if item.gateway is defined else []
'routes': [{'gateway': item.gateway}] if item.gateway is defined else [],
'link_local_addressing': item.link_local_addressing|default(None)
} %}
{% include "20-wired-routed.network.j2" %}
......@@ -9,7 +9,8 @@ Bridge=vmbr-{{ item.name }}
'interface': 'vl-' + item.name,
'addresses': item.addresses|default([item.address] if item.address is defined else []),
'nameservers': item.nameservers|default([]),
'routes': item.routes|default([{'gateway': item.gateway}] if item.gateway is defined else [])
'routes': item.routes|default([{'gateway': item.gateway}] if item.gateway is defined else []),
'link_local_addressing': item.link_local_addressing|default(None)
} %}
{% include "20-wired-routed.network.j2" %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment