summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/network/templates/network')
-rw-r--r--ansible/roles/network/templates/network/custom.link6
-rw-r--r--ansible/roles/network/templates/network/custom.network38
2 files changed, 44 insertions, 0 deletions
diff --git a/ansible/roles/network/templates/network/custom.link b/ansible/roles/network/templates/network/custom.link
new file mode 100644
index 0000000..e3bc5a8
--- /dev/null
+++ b/ansible/roles/network/templates/network/custom.link
@@ -0,0 +1,6 @@
1[Match]
2OriginalName={{ network.ethernets.interface }}
3
4[Link]
5WakeOnLan=off
6MACAddress={{ network.ethernets.macaddress }}
diff --git a/ansible/roles/network/templates/network/custom.network b/ansible/roles/network/templates/network/custom.network
new file mode 100644
index 0000000..5a8b74e
--- /dev/null
+++ b/ansible/roles/network/templates/network/custom.network
@@ -0,0 +1,38 @@
1[Match]
2Name={{ network.ethernets.interface }}
3
4#{% for net in network.ethernets.networks %}
5#[Network]
6#Address={{ net.subnet }}
7#{% if net.gateway is defined %}
8#Gateway={{ net.gateway }}
9#{% endif %}
10#
11#{% endfor %}
12
13
14{% for addr in network.ethernets.addresses %}
15[Address]
16Address={{ addr }}
17
18{% endfor %}
19
20{% for net in network.ethernets.networks %}
21[Network]
22Address={{ net.subnet }}
23{% if net.gateway is defined %}
24Gateway={{ net.gateway }}
25{% endif %}
26
27{% endfor %}
28
29
30{% for route in network.ethernets.routes %}
31[Route]
32Destination={{ route.to }}
33Gateway={{ route.via }}
34{% if route['on-link'] %}
35GatewayOnlink=true
36{% endif %}
37
38{% endfor %}
Powered by cgit v1.2.3 (git 2.41.0)