diff --git a/roles/uau/defaults/main.yml b/roles/uau/defaults/main.yml new file mode 100644 index 0000000..f383cbc --- /dev/null +++ b/roles/uau/defaults/main.yml @@ -0,0 +1,3 @@ +--- + +uau_reboot: "true" diff --git a/roles/uau/templates/50unattended-upgrades.j2 b/roles/uau/templates/50unattended-upgrades.j2 index f782243..88f7959 100644 --- a/roles/uau/templates/50unattended-upgrades.j2 +++ b/roles/uau/templates/50unattended-upgrades.j2 @@ -110,7 +110,7 @@ Unattended-Upgrade::Remove-Unused-Dependencies "true"; // Automatically reboot *WITHOUT CONFIRMATION* if // the file /var/run/reboot-required is found after the upgrade -Unattended-Upgrade::Automatic-Reboot "true"; +Unattended-Upgrade::Automatic-Reboot "{{ uau_reboot }}"; // Automatically reboot even if there are users currently logged in // when Unattended-Upgrade::Automatic-Reboot is set to true