2021-07-30 12:27:30 +00:00
|
|
|
defaults = {
|
|
|
|
'pacman': {
|
|
|
|
'ask_before_removal': {
|
|
|
|
'glibc',
|
|
|
|
'pacman',
|
|
|
|
},
|
2022-04-22 13:47:47 +00:00
|
|
|
'no_extract': {
|
2022-05-16 08:52:14 +00:00
|
|
|
'etc/cron.d/0hourly',
|
2022-04-22 13:47:47 +00:00
|
|
|
# don't install systemd-homed pam module. It produces a lot of spam in
|
|
|
|
# journal about systemd-homed not being active, so just get rid of it.
|
|
|
|
# Requires reinstall of systemd package, though
|
|
|
|
'usr/lib/security/pam_systemd_home.so',
|
|
|
|
},
|
2021-07-30 12:27:30 +00:00
|
|
|
'parallel_downloads': 4,
|
|
|
|
'repository': 'http://ftp.uni-kl.de/pub/linux/archlinux/$repo/os/$arch',
|
2022-02-13 08:43:52 +00:00
|
|
|
'unattended-upgrades': {
|
|
|
|
'day': 5,
|
|
|
|
'hour': 21,
|
|
|
|
},
|
2021-07-30 12:27:30 +00:00
|
|
|
},
|
|
|
|
}
|
2022-02-13 08:43:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
|
|
'cron/jobs/upgrade-and-reboot',
|
|
|
|
'icinga2_api/pacman/services',
|
|
|
|
)
|
|
|
|
def patchday(metadata):
|
|
|
|
if not metadata.get('pacman/unattended-upgrades/is_enabled', False):
|
|
|
|
return {}
|
|
|
|
|
|
|
|
day = metadata.get('pacman/unattended-upgrades/day')
|
|
|
|
hour = metadata.get('pacman/unattended-upgrades/hour')
|
|
|
|
|
|
|
|
return {
|
|
|
|
'cron': {
|
|
|
|
'jobs': {
|
|
|
|
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
|
|
|
minute=node.magic_number % 30,
|
|
|
|
hour=hour,
|
|
|
|
day=day,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'icinga2_api': {
|
|
|
|
'pacman': {
|
|
|
|
'services': {
|
|
|
|
'UNATTENDED UPGRADES': {
|
|
|
|
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_unattended_upgrades',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|