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 8b2fae1811d25bdde9df7383dd9861ac88b0a6fd..45de978723e09f3065212644041ad749f0fbfad4 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