summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Sluijters <daenney@users.noreply.github.com>2016-02-05 13:50:38 +0100
committerDaniele Sluijters <daenney@users.noreply.github.com>2016-02-05 13:52:26 +0100
commit67ee9eca5749fc54d8060cb7b87c8bd56c20765c (patch)
tree5890fa437ca0914d53bdb805f421fccd8f559bd2
parent4c1219083ba233f895fd99e5d3a3a363d489b727 (diff)
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.
-rw-r--r--manifests/init.pp2
-rw-r--r--spec/classes/unattended_upgrades_spec.rb5
2 files changed, 6 insertions, 1 deletions
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,
)
}