]> git.openstreetmap.org Git - chef.git/commitdiff
Hack up something to manage certificates for birthday20
authorTom Hughes <tom@compton.nu>
Thu, 1 Aug 2024 07:08:44 +0000 (08:08 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 1 Aug 2024 07:11:10 +0000 (08:11 +0100)
cookbooks/blog/metadata.rb
cookbooks/blog/recipes/birthday.rb
roles/birthday20.rb

index 7000d76dbda4e5ba80027c1e5383bd88fe7d152d..943dce0672a591d75c92940b1a35a3985631e8d2 100644 (file)
@@ -6,4 +6,5 @@ description       "Installs and configures Blog services"
 
 version           "1.0.0"
 supports          "ubuntu"
+depends           "ssl"
 depends           "wordpress"
index eac984ae0e3693656d424a1f27738906044306f9..f581c86dedd696a2ddbeabad286c9afb6bc7c3f2 100644 (file)
@@ -20,7 +20,7 @@
 include_recipe "wordpress"
 
 passwords = data_bag_item("birthday20", "passwords")
-wp2fa_encrypt_keys = data_bag_item("birthday20", "wp2fa_encrypt_keys")
+wp2fa_encrypt_keys = data_bag_item("birthday20", "wp2fa_encrypt_keys")
 
 directory "/srv/birthday20.openstreetmap.org" do
   owner "wordpress"
@@ -28,27 +28,27 @@ directory "/srv/birthday20.openstreetmap.org" do
   mode "755"
 end
 
-wordpress_site "birthday20.openstreetmap.org" do
-  aliases ["birthday20.osm.org", "birthday20.openstreetmap.com",
-           "birthday20.openstreetmap.net", "birthday20.openstreetmaps.org"]
-  directory "/srv/birthday20.openstreetmap.org/wp"
-  database_name "osm-birthday20"
-  database_user "osm-birthday20-user"
-  database_password passwords["osm-birthday20-user"]
-  wp2fa_encrypt_key wp2fa_encrypt_keys["key"]
-  fpm_prometheus_port 11403
-end
+wordpress_site "birthday20.openstreetmap.org" do
+  aliases ["birthday20.osm.org", "birthday20.openstreetmap.com",
+           "birthday20.openstreetmap.net", "birthday20.openstreetmaps.org"]
+  directory "/srv/birthday20.openstreetmap.org/wp"
+  database_name "osm-birthday20"
+  database_user "osm-birthday20-user"
+  database_password passwords["osm-birthday20-user"]
+  wp2fa_encrypt_key wp2fa_encrypt_keys["key"]
+  fpm_prometheus_port 11403
+end
 
-wordpress_plugin "birthday20.openstreetmap.org-shareadraft" do
-  action :delete
-  plugin "shareadraft"
-  site "birthday20.openstreetmap.org"
-end
+wordpress_plugin "birthday20.openstreetmap.org-shareadraft" do
+  action :delete
+  plugin "shareadraft"
+  site "birthday20.openstreetmap.org"
+end
 
-wordpress_plugin "birthday20.openstreetmap.org-public-post-preview" do
-  plugin "public-post-preview"
-  site "birthday20.openstreetmap.org"
-end
+wordpress_plugin "birthday20.openstreetmap.org-public-post-preview" do
+  plugin "public-post-preview"
+  site "birthday20.openstreetmap.org"
+end
 
 template "/etc/cron.daily/birthday20-backup" do
   source "backup-birthday20.cron.erb"
@@ -57,3 +57,8 @@ template "/etc/cron.daily/birthday20-backup" do
   mode "750"
   variables :passwords => passwords
 end
+
+ssl_certificate "birthday20.openstreetmap.org" do
+  domains ["birthday20.openstreetmap.org", "birthday20.osm.org", "birthday20.openstreetmap.com",
+           "birthday20.openstreetmap.net", "birthday20.openstreetmaps.org"]
+end
index 55132429e79a32ecf60f05b3a11f065281591c19..a1b9191c2600f22a18d9b0175aadafdff6225305 100644 (file)
@@ -13,7 +13,6 @@ default_attributes(
   }
 )
 
-# FIXME: Disable while site under development
-# run_list(
-#   "recipe[blog::birthday]"
-# )
+run_list(
+  "recipe[blog::birthday]"
+)