bundlewrap/bundles/hostname/items.py
2022-02-06 20:34:17 +01:00

11 lines
278 B
Python

files[node.metadata.get('hostname_file')] = {
'content': node.metadata.get('hostname'),
'triggers': [
'action:update_hostname',
],
}
actions["update_hostname"] = {
"command": f"hostname -F {node.metadata.get('hostname_file')}",
'triggered': True,
}