bundlewrap/bundles/radvd/items.py

37 lines
782 B
Python
Raw Permalink Normal View History

if node.has_bundle('pppd'):
files['/etc/ppp/ip-up.d/radvd'] = {
'source': 'ip-up',
'mode': '0755',
}
files['/etc/ppp/ip-down.d/radvd'] = {
'source': 'ip-down',
'mode': '0755',
}
# Will be started and stopped by pppd.
2021-02-12 19:37:36 +00:00
SHOULD_BE_RUNNING = None
SHOULD_BE_ENABLED = False
else:
2021-02-12 19:37:36 +00:00
SHOULD_BE_RUNNING = True
SHOULD_BE_ENABLED = True
files['/etc/radvd.conf'] = {
'content_type': 'mako',
'context': {
'interfaces': node.metadata['radvd']['interfaces'],
},
'triggers': {
'svc_systemd:radvd:restart',
},
}
svc_systemd = {
'radvd': {
2021-02-12 19:37:36 +00:00
'running': SHOULD_BE_RUNNING,
'enabled': SHOULD_BE_ENABLED,
'needs': {
'file:/etc/radvd.conf',
},
},
}