]> git.openstreetmap.org Git - chef.git/commitdiff
Use 20.04 chef client on 22.04 for now
authorTom Hughes <tom@compton.nu>
Wed, 29 Jun 2022 18:01:31 +0000 (19:01 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 29 Jun 2022 19:41:45 +0000 (20:41 +0100)
cookbooks/chef/recipes/default.rb

index 61ac42415fd2a36aeb08c168da46c78fa22e3a79..bd22671a73ced1934610183924c600f1cde64175 100644 (file)
@@ -36,8 +36,14 @@ Dir.glob("#{cache_dir}/chef_*.deb").each do |deb|
   end
 end
 
+ubuntu_release = if node[:lsb][:release].to_f < 22.04
+                   node[:lsb][:release]
+                 else
+                   "20.04"
+                 end
+
 remote_file "#{cache_dir}/#{chef_package}" do
-  source "https://packages.chef.io/files/stable/chef/#{chef_version}/ubuntu/#{node[:lsb][:release]}/#{chef_package}"
+  source "https://packages.chef.io/files/stable/chef/#{chef_version}/ubuntu/#{ubuntu_release}/#{chef_package}"
   owner "root"
   group "root"
   mode "644"