Skip to content
This repository
Browse code

Adding periodic updates enable option for unattended upgrades and def…

…aulting to disabled
  • Loading branch information...
commit 91d3f74130cfacb977da45892175ba3aa934a4a2 1 parent 8ff890f
Travis Graham tgraham authored
1  lib/moonshine/manifest/rails/os.rb
@@ -135,6 +135,7 @@ def time_zone
135 135 def security_updates
136 136 configure(:unattended_upgrade => {:allowed_origins => [distro_unattended_security_origin].compact})
137 137 unattended_config = <<-CONFIG
  138 +APT::Periodic::Enable "#{configuration[:unattended_upgrade][:enable]||0}";
138 139 APT::Periodic::Update-Package-Lists "#{configuration[:unattended_upgrade][:package_lists]||1}";
139 140 APT::Periodic::Unattended-Upgrade "#{configuration[:unattended_upgrade][:interval]||1}";
140 141 CONFIG
3  spec/moonshine/manifest/os_spec.rb
@@ -90,6 +90,9 @@
90 90
91 91 @manifest.should have_package("unattended-upgrades")
92 92 @manifest.should have_file("/etc/apt/apt.conf.d/10periodic").with_content(
  93 + /APT::Periodic::Enable "0"/
  94 + )
  95 + @manifest.should have_file("/etc/apt/apt.conf.d/10periodic").with_content(
93 96 /APT::Periodic::Unattended-Upgrade "1"/
94 97 )
95 98 @manifest.should have_file("/etc/apt/apt.conf.d/50unattended-upgrades").with_content(

0 comments on commit 91d3f74

Please sign in to comment.
Something went wrong with that request. Please try again.