From 67ee9eca5749fc54d8060cb7b87c8bd56c20765c Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 5 Feb 2016 13:50:38 +0100 Subject: unattended_upgrades: default `notify_update` to false The settings that we write for unattended-upgrades, though part of `/etc/apt` on the filesystem, do not affect apt's behaviour. As such notifying `apt::update` only serves to slow us down. --- manifests/init.pp | 2 +- spec/classes/unattended_upgrades_spec.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3d9f2df..489db32 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -17,7 +17,7 @@ class unattended_upgrades ( $upgrade = 1, $upgradeable_packages = {}, $verbose = 0, - $notify_update = undef, + $notify_update = false, ) inherits ::unattended_upgrades::params { if $legacy_origin == undef or $origins == undef { diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index d91ef61..5943f02 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -19,12 +19,14 @@ describe 'unattended_upgrades' do it { should contain_apt__conf('unattended-upgrades').with( :require => 'Package[unattended-upgrades]', + :notify_update => false, ) } it { should contain_apt__conf('periodic').with( :require => 'Package[unattended-upgrades]', + :notify_update => false, ) } @@ -289,17 +291,20 @@ describe 'unattended_upgrades' do }, :dl_limit => 70, :random_sleep => 300, + :notify_update => true, } end it { should contain_package('unattended-upgrades') } it { should contain_apt__conf('unattended-upgrades').with( :require => 'Package[unattended-upgrades]', + :notify_update => true, ) } it { should contain_apt__conf('periodic').with( :require => 'Package[unattended-upgrades]', + :notify_update => true, ) } -- cgit v1.2.3