36 lines
996 B
Python
36 lines
996 B
Python
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',
|
|
},
|
|
'SYSTEMD-TIMESYNCD SYNC': {
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_timesyncd_sync',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
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',
|
|
'svc_systemd:systemd-timesyncd',
|
|
},
|
|
}
|