Skip to content
Browse files

Adding periodic updates enable option for unattended upgrades and def…

…aulting to disabled
  • Loading branch information...
1 parent 8ff890f commit 91d3f74130cfacb977da45892175ba3aa934a4a2 @tgraham tgraham committed Apr 11, 2012
Showing with 4 additions and 0 deletions.
  1. +1 −0 lib/moonshine/manifest/rails/os.rb
  2. +3 −0 spec/moonshine/manifest/os_spec.rb
View
1 lib/moonshine/manifest/rails/os.rb
@@ -135,6 +135,7 @@ def time_zone
def security_updates
configure(:unattended_upgrade => {:allowed_origins => [distro_unattended_security_origin].compact})
unattended_config = <<-CONFIG
+APT::Periodic::Enable "#{configuration[:unattended_upgrade][:enable]||0}";
APT::Periodic::Update-Package-Lists "#{configuration[:unattended_upgrade][:package_lists]||1}";
APT::Periodic::Unattended-Upgrade "#{configuration[:unattended_upgrade][:interval]||1}";
CONFIG
View
3 spec/moonshine/manifest/os_spec.rb
@@ -90,6 +90,9 @@
@manifest.should have_package("unattended-upgrades")
@manifest.should have_file("/etc/apt/apt.conf.d/10periodic").with_content(
+ /APT::Periodic::Enable "0"/
+ )
+ @manifest.should have_file("/etc/apt/apt.conf.d/10periodic").with_content(
/APT::Periodic::Unattended-Upgrade "1"/
)
@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.