]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nginx/resources/site.rb
Restart nginx after an imagery_site is updated
[chef.git] / cookbooks / nginx / resources / site.rb
index bdea43487ea6bcf30f8e97767c4c7f5da5417eca..e48e7b80d2ade6a24e69ca626bbd9c6412c66cc5 100644 (file)
@@ -25,7 +25,8 @@ attribute :directory, :kind_of => String
 attribute :cookbook, :kind_of => String
 attribute :template, :kind_of => String, :required => true
 attribute :variables, :kind_of => Hash, :default => {}
+attribute :restart_nginx, :kind_of => [TrueClass, FalseClass], :default => true
 
 def after_created
-  notifies :restart, "service[nginx]"
+  notifies :restart, "service[nginx]" if restart_nginx
 end