bundles/apt: add option to configure patch-hour, not only patchday
This commit is contained in:
parent
17dbba2c94
commit
c0353d2911
2 changed files with 6 additions and 2 deletions
|
@ -16,11 +16,13 @@ defaults = {
|
|||
)
|
||||
def patchday(metadata):
|
||||
day = metadata.get('apt/unattended_upgrades/day', 5)
|
||||
hour = metadata.get('apt/unattended_upgrades/hour', 1)
|
||||
|
||||
return {
|
||||
'cron': {
|
||||
'upgrade-and-reboot': '{minute} 1 * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
minute=node.magic_number % 30,
|
||||
hour=hour,
|
||||
day=day,
|
||||
),
|
||||
},
|
||||
|
|
|
@ -23,11 +23,13 @@ defaults = {
|
|||
)
|
||||
def patchday(metadata):
|
||||
day = metadata.get('apt/unattended_upgrades/day', 5)
|
||||
hour = metadata.get('apt/unattended_upgrades/hour', 1)
|
||||
|
||||
return {
|
||||
'cron': {
|
||||
'upgrade-and-reboot': '{minute} 1 * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
'upgrade-and-reboot': '{minute} {hour} * * {day} root /usr/local/sbin/upgrade-and-reboot'.format(
|
||||
minute=node.magic_number % 30,
|
||||
hour=hour,
|
||||
day=day,
|
||||
),
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue