Purge cloud-init completely
authorTom Hughes <tom@compton.nu>
Thu, 21 Mar 2019 00:03:05 +0000 (00:03 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 Mar 2019 00:03:05 +0000 (00:03 +0000)
cookbooks/networking/recipes/default.rb

index 8b2fae1..45de978 100644 (file)
@@ -173,11 +173,11 @@ if node[:networking][:netplan]
   end
 
   file "/etc/cloud/cloud.cfg.d/99-chef.cfg" do
-    owner "root"
-    group "root"
-    mode 0o644
-    content YAML.dump("network" => { "config" => "disabled" })
-    only_if { ::Dir.exist?("/etc/cloud/cloud.cfg.d") }
+    action :delete
+  end
+
+  package "cloud-init" do
+    action :purge
   end
 else
   package network_packages