]> git.openstreetmap.org Git - chef.git/commitdiff
Don't try and configure sysctl on lxc systems
authorTom Hughes <tom@compton.nu>
Mon, 16 Mar 2020 17:07:45 +0000 (17:07 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Mar 2020 17:07:45 +0000 (17:07 +0000)
cookbooks/sysctl/recipes/default.rb

index a2facc06393aad22791feaf98f4273685c89b20d..ae22a7b3b67dee6a0d46388f7278951b71c98182 100644 (file)
@@ -22,7 +22,8 @@ file "/etc/sysctl.d/60-chef.conf" do
 end
 
 if node[:virtualization][:role] != "guest" ||
-   node[:virtualization][:system] != "lxd"
+   (node[:virtualization][:system] != "lxc" &&
+    node[:virtualization][:system] != "lxd")
   keys = []
 
   Dir.new("/etc/sysctl.d").each_entry do |file|