summaryrefslogtreecommitdiff
path: root/ansible/roles/self-updating-system
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-03-03 10:59:34 +0200
committerLars Wirzenius <liw@liw.fi>2020-03-03 10:59:34 +0200
commitb05015e4bf0d7cfbabf2d3c3ba08b5a471d307f4 (patch)
tree2c81e698b9de333a465872a82fbc69d2a995f6c5 /ansible/roles/self-updating-system
parent3b76604567bcddb4a6407606282bc723cbfe3d4e (diff)
downloadansibleness-b05015e4bf0d7cfbabf2d3c3ba08b5a471d307f4.tar.gz
Change: make the automatic reboot after u-u optional
Diffstat (limited to 'ansible/roles/self-updating-system')
-rw-r--r--ansible/roles/self-updating-system/defaults/main.yml5
-rw-r--r--ansible/roles/self-updating-system/templates/unattended-upgrades.conf2
2 files changed, 6 insertions, 1 deletions
diff --git a/ansible/roles/self-updating-system/defaults/main.yml b/ansible/roles/self-updating-system/defaults/main.yml
new file mode 100644
index 0000000..5e1f1c8
--- /dev/null
+++ b/ansible/roles/self-updating-system/defaults/main.yml
@@ -0,0 +1,5 @@
+# Set to "true" (the string, not the boolean value) to enable
+# automatic reboots when unattended-upgrades deems it necessary.
+# Default is to avoid that.
+
+automatic_reboot: "false"
diff --git a/ansible/roles/self-updating-system/templates/unattended-upgrades.conf b/ansible/roles/self-updating-system/templates/unattended-upgrades.conf
index 7675763..8da165e 100644
--- a/ansible/roles/self-updating-system/templates/unattended-upgrades.conf
+++ b/ansible/roles/self-updating-system/templates/unattended-upgrades.conf
@@ -8,7 +8,7 @@ Unattended-Upgrade::Origins-Pattern {
Unattended-Upgrade::Mail "root";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
-Unattended-Upgrade::Automatic-Reboot "true";
+Unattended-Upgrade::Automatic-Reboot "{{ automatic_reboot }}";
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";