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']),
|
2021-01-23 11:05:59 +00:00
|
|
|
# Provided by bundle:basic
|
2020-03-27 12:46:10 +00:00
|
|
|
'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
|
|
|
}
|
2020-12-12 09:39:57 +00:00
|
|
|
|
|
|
|
files = {
|
|
|
|
'/etc/systemd/journald.conf': {
|
|
|
|
'content_type': 'mako',
|
|
|
|
'context': {
|
|
|
|
'journal': node.metadata.get('systemd', {}).get('journal', {}),
|
|
|
|
},
|
|
|
|
'triggers': {
|
|
|
|
'svc_systemd:systemd-journald:restart',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
svc_systemd = {
|
|
|
|
'systemd-journald': {
|
|
|
|
'needs': {
|
|
|
|
'file:/etc/systemd/journald.conf',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|