]> git.openstreetmap.org Git - chef.git/commitdiff
Use debian 11 chef client on debian 12
authorTom Hughes <tom@compton.nu>
Fri, 17 Nov 2023 19:02:46 +0000 (19:02 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 17 Nov 2023 19:06:07 +0000 (19:06 +0000)
cookbooks/chef/recipes/default.rb

index d06162465a702d20ea9c29f5d9329a807f03c241..91a91001c3d4254e6bfc9db199e7c6688166acb0 100644 (file)
@@ -49,7 +49,11 @@ Dir.glob("#{cache_dir}/chef_*.deb").each do |deb|
   end
 end
 
-os_release = node[:lsb][:release]
+os_release = if platform?("debian") && node[:lsb][:release].to_f > 11
+               11
+             else
+               node[:lsb][:release]
+             end
 
 remote_file "#{cache_dir}/#{chef_package}" do
   source "https://packages.chef.io/files/stable/chef/#{chef_version}/#{chef_platform}/#{os_release}/#{chef_package}"