From 677d48d42fb7b792a634a5880cc9e86ef6623cdf Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Mon, 7 Dec 2015 17:26:01 +0100 Subject: [PATCH] Enable automatic cleanup Set Unattended-Upgrade:Remove-Unused-Dependencies flag to true, that is the equivalent of enabling automatic apt-get autoremove. This will regularly clean up cruft from our servers, preventing them to run out of disk space or inodes unexpectedly. Change-Id: I37871087b7b3beb02329d84ef240bde23197291b --- manifests/init.pp | 2 +- templates/50unattended-upgrades.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index c4a7555..899c073 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,7 +2,7 @@ # class unattended_upgrades( $ensure = present, - $origins = [] + $origins = [], ) { package { 'unattended-upgrades': ensure => $ensure, diff --git a/templates/50unattended-upgrades.erb b/templates/50unattended-upgrades.erb index 3c1c3b1..f22eac8 100644 --- a/templates/50unattended-upgrades.erb +++ b/templates/50unattended-upgrades.erb @@ -26,7 +26,7 @@ Unattended-Upgrade::Mail "root"; // Do automatic removal of new unused dependencies after the upgrade // (equivalent to apt-get autoremove) -//Unattended-Upgrade::Remove-Unused-Dependencies "false"; +Unattended-Upgrade::Remove-Unused-Dependencies "true"; // Automatically reboot *WITHOUT CONFIRMATION* if a // the file /var/run/reboot-required is found after the upgrade