Force unlinking of certificates
authorTom Hughes <tom@compton.nu>
Sat, 11 Feb 2017 19:42:08 +0000 (19:42 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 11 Feb 2017 19:42:08 +0000 (19:42 +0000)
cookbooks/ssl/resources/certificate.rb

index 42957c798f5e7a17ad8980c126ee92b05103ea6e..fc94d39deb840f07c2abf24e46e244c51372763e 100644 (file)
@@ -41,6 +41,7 @@ action :create do
       content certificate
       backup false
       manage_symlink_source false
+      force_unlink true
     end
 
     file "/etc/ssl/private/#{name}.key" do
@@ -50,6 +51,7 @@ action :create do
       content key
       backup false
       manage_symlink_source false
+      force_unlink true
     end
   elsif fallback_certificate
     link "/etc/ssl/certs/#{name}.pem" do