]> git.openstreetmap.org Git - chef.git/commitdiff
Prefer the version of cciss-vol-status in the Ubuntu repositories
authorTom Hughes <tom@compton.nu>
Tue, 2 Apr 2019 07:57:28 +0000 (08:57 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 2 Apr 2019 08:09:26 +0000 (09:09 +0100)
cookbooks/apt/recipes/default.rb
cookbooks/apt/templates/default/preferences.erb [new file with mode: 0644]

index 3a660527da1a70c3f3ecf55ef4283bbcfc815180..14e37dd9b6ba75a29cb62383c3c8ed7c7873dcfd 100644 (file)
@@ -28,6 +28,13 @@ file "/etc/motd.tail" do
   action :delete
 end
 
+template "/etc/apt/preferences.d/99-chef" do
+  source "preferences.erb"
+  owner "root"
+  group "root"
+  mode 0o644
+end
+
 apt_update "/etc/apt/sources.list" do
   action :nothing
 end
diff --git a/cookbooks/apt/templates/default/preferences.erb b/cookbooks/apt/templates/default/preferences.erb
new file mode 100644 (file)
index 0000000..6f89c16
--- /dev/null
@@ -0,0 +1,5 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+Package: cciss-vol-status
+Pin: origin "*.ubuntu.com"
+Pin-Priority: 1100