]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apt/recipes/default.rb
imagery: increase coct aerial zoom
[chef.git] / cookbooks / apt / recipes / default.rb
index 4243d565d1e2045839b8018802c0b7a689f2706a..cc6e470693c5a59c01b1812ce7dca8c8ae8b02d3 100644 (file)
@@ -130,17 +130,19 @@ end
 
 package "unattended-upgrades"
 
-auto_upgrades = if node[:apt][:unattended_upgrades][:enable]
-                  IO.read("/usr/share/unattended-upgrades/20auto-upgrades")
-                else
-                  IO.read("/usr/share/unattended-upgrades/20auto-upgrades-disabled")
-                end
-
-file "/etc/apt/apt.conf.d/20auto-upgrades" do
-  user "root"
-  group "root"
-  mode 0o644
-  content auto_upgrades
+if Dir.exist?("/usr/share/unattended-upgrades")
+  auto_upgrades = if node[:apt][:unattended_upgrades][:enable]
+                    IO.read("/usr/share/unattended-upgrades/20auto-upgrades")
+                  else
+                    IO.read("/usr/share/unattended-upgrades/20auto-upgrades-disabled")
+                  end
+
+  file "/etc/apt/apt.conf.d/20auto-upgrades" do
+    user "root"
+    group "root"
+    mode 0o644
+    content auto_upgrades
+  end
 end
 
 template "/etc/apt/apt.conf.d/60chef" do