From: Grant Slater Date: Sat, 25 Apr 2020 22:32:26 +0000 (+0100) Subject: nginx: cleanup reload triggers X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/f302413e80dec785a9a364de0fec53a69a2ab351?ds=inline nginx: cleanup reload triggers --- diff --git a/cookbooks/imagery/recipes/default.rb b/cookbooks/imagery/recipes/default.rb index 961216f9d..7fd210284 100644 --- a/cookbooks/imagery/recipes/default.rb +++ b/cookbooks/imagery/recipes/default.rb @@ -82,7 +82,6 @@ end nginx_site "default" do template "nginx_default.conf.erb" directory "/srv/imagery/default" - reload_nginx false end systemd_tmpfile "/run/mapserver-fastcgi" do diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index f8d3b1aa1..394142af7 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -115,5 +115,4 @@ end def after_created notifies :create, "imagery_site[#{site}]" notifies :reload, "service[nginx]" - # notifies :restart, "service[mapserv-fcgi-#{site}]" end diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index dc819ebf9..8aaef45ee 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -137,7 +137,6 @@ action :create do nginx_site new_resource.site do template "nginx_imagery.conf.erb" directory "/srv/imagery/#{new_resource.site}" - reload_nginx false variables new_resource.to_hash end end diff --git a/cookbooks/nginx/resources/site.rb b/cookbooks/nginx/resources/site.rb index 8ac81adcf..8a50ae042 100644 --- a/cookbooks/nginx/resources/site.rb +++ b/cookbooks/nginx/resources/site.rb @@ -24,7 +24,6 @@ property :directory, :kind_of => String property :cookbook, :kind_of => String property :template, :kind_of => String, :required => true property :variables, :kind_of => Hash, :default => {} -property :reload_nginx, :kind_of => [TrueClass, FalseClass], :default => true action :create do declare_resource :template, conf_path do @@ -40,6 +39,7 @@ end action :delete do file conf_path do action :delete + notifies :reload, "service[nginx]" end end @@ -54,5 +54,5 @@ action_class do end def after_created - notifies :reload, "service[nginx]" if reload_nginx + notifies :reload, "service[nginx]" end