2022-12-16 14:32:09 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
|
|
|
'chrony': {
|
|
|
|
'installed': False,
|
|
|
|
},
|
|
|
|
'ntp': {
|
|
|
|
'installed': False,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'icinga2_api': {
|
|
|
|
'systemd': {
|
|
|
|
'services': {
|
|
|
|
'SYSTEMD-TIMESYNCD STATUS': {
|
|
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit systemd-timesyncd',
|
2022-03-13 13:06:40 +00:00
|
|
|
},
|
2022-12-16 15:14:26 +00:00
|
|
|
'SYSTEMD-TIMESYNCD SYNC': {
|
|
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_timesyncd_sync',
|
|
|
|
},
|
2022-03-13 13:06:40 +00:00
|
|
|
},
|
|
|
|
},
|
2022-12-16 14:32:09 +00:00
|
|
|
},
|
2024-12-02 19:17:54 +00:00
|
|
|
'timezone': 'UTC',
|
2022-12-16 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-08-28 15:21:48 +00:00
|
|
|
if not node.has_bundle('rsyslogd'):
|
|
|
|
defaults['apt']['packages']['rsyslog'] = {
|
|
|
|
'installed': False,
|
|
|
|
}
|
|
|
|
|
2022-12-16 14:32:09 +00:00
|
|
|
if node.has_bundle('apt') and node.os_version[0] > 10:
|
|
|
|
defaults['apt']['packages']['systemd-timesyncd'] = {
|
|
|
|
'after': {
|
|
|
|
'pkg_apt:chrony',
|
|
|
|
'pkg_apt:ntp',
|
|
|
|
},
|
|
|
|
'needed_by': {
|
|
|
|
'action:systemd-enable-ntp',
|
2023-05-20 09:25:26 +00:00
|
|
|
'svc_systemd:systemd-timesyncd',
|
2022-12-16 14:32:09 +00:00
|
|
|
},
|
2022-03-13 13:12:05 +00:00
|
|
|
}
|