From: Tom Hughes Date: Wed, 13 Sep 2017 17:32:46 +0000 (+0100) Subject: Restart the chef server when the certificate changes X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/7dbbea65a60915715c0b9f5fac84f47cd38c9dfa Restart the chef server when the certificate changes --- diff --git a/cookbooks/chef/recipes/server.rb b/cookbooks/chef/recipes/server.rb index ee27718f9..d3a26755a 100644 --- a/cookbooks/chef/recipes/server.rb +++ b/cookbooks/chef/recipes/server.rb @@ -65,6 +65,13 @@ execute "chef-server-reconfigure" do group "root" end +execute "chef-server-restart" do + action :nothing + command "chef-server-ctl restart" + user "root" + group "root" +end + systemd_service "chef-server" do description "Chef server" after "network.target" @@ -82,6 +89,7 @@ apache_module "proxy_http" ssl_certificate "chef.openstreetmap.org" do domains ["chef.openstreetmap.org", "chef.osm.org"] notifies :reload, "service[apache2]" + notifies :run, "execute[chef-server-restart]" end apache_site "chef.openstreetmap.org" do