Commit c2c67d71 authored by Bernhard Geier's avatar Bernhard Geier

unattended_upgrades: reboot on fridays if host has no variable "vm_id"

parent 6cd6f94e
......@@ -21,7 +21,7 @@
- name: Let restart server once a week but not all at the same time
name: weekly restart
weekday: "{{(vm_id-2)%7}}"
weekday: "{{ (vm_id|default(0)-2)%7 }}"
hour: "3"
minute: "{{(vm_id*2)%30+30}}"
minute: "{{ (vm_id|default(0)*2)%30+30 }}"
job: "if [ -f /var/run/reboot-required ]; then /sbin/shutdown -r +5; fi"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment