bundles/systemd-networkd: add "enable-resolved" flag

This commit is contained in:
Franzi 2021-02-18 17:56:43 +01:00
parent fbf0371371
commit 6e9fb7044a
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -10,11 +10,19 @@ files = {
'/etc/network/interfaces': {
'delete': True,
},
'/etc/resolv.conf': {
'content_type': 'mako',
},
}
if node.metadata.get('systemd-networkd/enable-resolved', False):
symlinks['/etc/resolv.conf'] = {
'target': '/run/systemd/resolve/stub-resolv.conf',
}
svc_systemd['systemd-resolved'] = {}
else:
files['/etc/resolv.conf'] = {
'content_type': 'mako',
}
directories = {
'/etc/systemd/network': {
'purge': True,