From a5f13ff6f91428358405a435b4c84348d27b038f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 2 Apr 2019 08:57:28 +0100 Subject: [PATCH] Prefer the version of cciss-vol-status in the Ubuntu repositories --- cookbooks/apt/recipes/default.rb | 7 +++++++ cookbooks/apt/templates/default/preferences.erb | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 cookbooks/apt/templates/default/preferences.erb diff --git a/cookbooks/apt/recipes/default.rb b/cookbooks/apt/recipes/default.rb index 3a660527d..14e37dd9b 100644 --- a/cookbooks/apt/recipes/default.rb +++ b/cookbooks/apt/recipes/default.rb @@ -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 index 000000000..6f89c16ad --- /dev/null +++ b/cookbooks/apt/templates/default/preferences.erb @@ -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 -- 2.43.2