]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/letsencrypt/recipes/default.rb
Add postgres 14 to snap-02
[chef.git] / cookbooks / letsencrypt / recipes / default.rb
index 3590fc94d106b7f2160687c5068d52dffad62f98..92c78a51d652b3e70397623e4ddf7dfebf32cf9c 100644 (file)
@@ -19,6 +19,7 @@
 
 include_recipe "accounts"
 include_recipe "apache"
 
 include_recipe "accounts"
 include_recipe "apache"
+include_recipe "chef::knife"
 
 keys = data_bag_item("chef", "keys")
 
 
 keys = data_bag_item("chef", "keys")
 
@@ -148,7 +149,7 @@ certificates.each do |name, details|
     user "letsencrypt"
     group "letsencrypt"
     subscribes :run, "template[/srv/acme.openstreetmap.org/requests/#{name}]"
     user "letsencrypt"
     group "letsencrypt"
     subscribes :run, "template[/srv/acme.openstreetmap.org/requests/#{name}]"
-    not_if { ENV["TEST_KITCHEN"] }
+    not_if { kitchen? }
   end
 end
 
   end
 end
 
@@ -190,3 +191,10 @@ cron_d "letencrypt-check" do
   command "/srv/acme.openstreetmap.org/bin/check-certificates"
   mailto "admins@openstreetmap.org"
 end
   command "/srv/acme.openstreetmap.org/bin/check-certificates"
   mailto "admins@openstreetmap.org"
 end
+
+template "/etc/logrotate.d/letsencrypt" do
+  source "logrotate.erb"
+  owner "root"
+  group "root"
+  mode "644"
+end