2020-12-18 15:30:17 +00:00
|
|
|
if node.has_bundle('pppd'):
|
2020-11-14 10:34:16 +00:00
|
|
|
files['/etc/ppp/ip-up.d/wide-dhcp6c'] = {
|
|
|
|
'source': 'ip-up',
|
|
|
|
'content_type': 'mako',
|
2023-09-23 07:23:41 +00:00
|
|
|
'context': node.metadata.get('wide-dhcp6c'),
|
2020-11-14 10:34:16 +00:00
|
|
|
'mode': '0755',
|
2023-09-23 07:23:41 +00:00
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:wide-dhcpv6-client:restart',
|
|
|
|
},
|
2020-11-14 10:34:16 +00:00
|
|
|
}
|
2023-09-23 07:23:41 +00:00
|
|
|
|
2020-11-14 10:34:16 +00:00
|
|
|
files['/etc/ppp/ip-down.d/wide-dhcp6c'] = {
|
|
|
|
'source': 'ip-down',
|
|
|
|
'content_type': 'mako',
|
2023-09-23 07:23:41 +00:00
|
|
|
'context': node.metadata.get('wide-dhcp6c'),
|
2020-11-14 10:34:16 +00:00
|
|
|
'mode': '0755',
|
2023-09-23 07:23:41 +00:00
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:wide-dhcpv6-client:restart',
|
|
|
|
},
|
2020-11-14 10:34:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Will be started and stopped by pppd.
|
2021-02-12 19:37:36 +00:00
|
|
|
SHOULD_BE_RUNNING = None
|
|
|
|
SHOULD_BE_ENABLED = False
|
2020-11-14 10:34:16 +00:00
|
|
|
else:
|
2021-02-12 19:37:36 +00:00
|
|
|
SHOULD_BE_RUNNING = True
|
|
|
|
SHOULD_BE_ENABLED = True
|
2020-11-14 10:34:16 +00:00
|
|
|
|
|
|
|
files['/etc/wide-dhcpv6/dhcp6c.conf'] = {
|
|
|
|
'content_type': 'mako',
|
2023-09-23 07:23:41 +00:00
|
|
|
'context': node.metadata.get('wide-dhcp6c'),
|
2020-11-14 10:34:16 +00:00
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:wide-dhcpv6-client:restart',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
files['/etc/systemd/system/wide-dhcpv6-client.service'] = {
|
|
|
|
'content_type': 'mako',
|
2023-09-23 07:23:41 +00:00
|
|
|
'context': node.metadata.get('wide-dhcp6c'),
|
2020-11-14 10:34:16 +00:00
|
|
|
'triggers': {
|
|
|
|
'action:systemd-reload',
|
|
|
|
'svc_systemd:wide-dhcpv6-client:restart',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'wide-dhcpv6-client': {
|
2021-02-12 19:37:36 +00:00
|
|
|
'running': SHOULD_BE_RUNNING,
|
|
|
|
'enabled': SHOULD_BE_ENABLED,
|
2020-11-14 10:34:16 +00:00
|
|
|
'needs': {
|
|
|
|
'file:/etc/systemd/system/wide-dhcpv6-client.service',
|
|
|
|
'file:/etc/wide-dhcpv6/dhcp6c.conf',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|