2020-03-21 11:31:56 +00:00
|
|
|
actions = {
|
|
|
|
'systemd-reload': {
|
2020-09-22 16:11:09 +00:00
|
|
|
'command': 'systemctl daemon-reload',
|
2020-03-21 11:31:56 +00:00
|
|
|
'cascade_skip': False,
|
|
|
|
'triggered': True,
|
2020-03-27 12:46:10 +00:00
|
|
|
'needed_by': {
|
|
|
|
'svc_systemd:',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'systemd-hostname': {
|
2020-10-25 10:07:23 +00:00
|
|
|
'command': 'hostnamectl set-hostname {}'.format(node.metadata['hostname']),
|
|
|
|
'unless': '[ "$(hostnamectl --static)" = "{}" ]'.format(node.metadata['hostname']),
|
2020-03-27 12:46:10 +00:00
|
|
|
# Provided by 'hostname' bundle
|
|
|
|
'needs': {
|
|
|
|
'file:/etc/hosts',
|
|
|
|
},
|
2020-03-21 11:31:56 +00:00
|
|
|
},
|
2020-11-13 22:26:13 +00:00
|
|
|
'systemd-timezone': {
|
|
|
|
'command': 'timedatectl set-timezone UTC',
|
|
|
|
'unless': 'timedatectl status | grep -Fi \'time zone\' | grep -i \'utc\'',
|
|
|
|
},
|
|
|
|
'systemd-enable-ntp': {
|
|
|
|
'command': 'timedatectl set-ntp true',
|
|
|
|
'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'',
|
|
|
|
},
|
2020-03-21 11:31:56 +00:00
|
|
|
}
|