tkurki / marinepi-provisioning

Ansible provisioning scripts to set up a Raspberry Pi for marine use
Apache License 2.0
45 stars 21 forks source link

Unattended upgrades improvements #96

Closed chacal closed 3 years ago

chacal commented 3 years ago

Optionally delay unattended upgrade reboot until some random time at night

If enabled, reboots required by unattended upgrades are set to happen some time between 2:00 and 4:59. Once the configuration is applied, the reboots always happen at the same time, but the time itself differs between different hosts. Reboot time is random between hosts, but stays the same for each run for the same host (Ansible runs stay idempotent).

By default reboots still occur immediately after the updates requiring them have been applied.

Allow setting From: address for notification emails

By default the From: value is "root" (without any domain) and some mail provides don't accept it (e.g. SendGrid).

Use better variable to control distro upgrades for unattended upgrades

Previously this was controlled by unattended_upgrades_email variable that makes no sense at all. Introduce a new variable unattended_upgrades_distro_updates for this purpose (defaults to true).