Commit 88024b8a authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

Merge branch 'networkd-linkfiles' into 'master'

networkd: add support for link files

See merge request !5
parents 661062e1 77617694
Pipeline #3838 passed with stage
in 39 seconds
---
# interfaces:
# - identifier: name_for_the_link_file
# match:
# PermanentMACAddress: "01:23:45:67:89:ab"
# link:
# Name: veryimportantinterface
#
# networkd:
# - type: 'dhcp'
# - type: 'static'
......
......@@ -21,6 +21,17 @@
notify:
- restart networkd
- name: ensure there are link files if needed
template:
src: "interface.link.j2"
dest: "/etc/systemd/network/{{ item.0 }}-{{ item.1.identifier }}.link"
owner: root
group: root
mode: '0644'
with_indexed_items: "{{ interfaces|default([]) }}"
notify:
- restart networkd
- name: find network config files generated by the bootstrap process
find:
path: /etc/systemd/network
......
[Match]
{% for key, value in item.1["match"].items() %}
{{ key }}={{ value }}
{% endfor %}
[Link]
{% for key, value in item.1["link"].items() %}
{{ key }}={{ value }}
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment