Closed jcputter closed 7 years ago
anyone?
I'm not 100% sure, but I think the logic is not 100% correct in the preferences resource, e.g. it should be changed like this:
--- a/cookbooks/apt/providers/preference.rb
+++ b/cookbooks/apt/providers/preference.rb
@@ -54,8 +54,7 @@ action :add do
if ::File.exist?("/etc/apt/preferences.d/#{new_resource.name}.pref")
Chef::Log.warn "Replacing #{new_resource.name}.pref with #{name}.pref in /etc/apt/preferences.d/"
end
- only_if { name != new_resource.name }
- end
+ end if name != new_resource.name
file "/etc/apt/preferences.d/#{new_resource.name}" do
action :delete
Otherwise we get the resource cloning, as the "Replacing xx.pref" log warning gets executed every time.
did yet not really get released, right?
5.0.1 has been released
WARN: Cloning resource attributes for file[/etc/apt/preferences.d/my_packages.pref] from prior resource (CHEF-3694)
I'm using the following