bundlewrap/bundles/systemd/items.py
2020-10-25 11:14:46 +01:00

18 lines
521 B
Python

actions = {
'systemd-reload': {
'command': 'systemctl daemon-reload',
'cascade_skip': False,
'triggered': True,
'needed_by': {
'svc_systemd:',
},
},
'systemd-hostname': {
'command': 'hostnamectl set-hostname {}'.format(node.metadata['hostname']),
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(node.metadata['hostname']),
# Provided by 'hostname' bundle
'needs': {
'file:/etc/hosts',
},
},
}