]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nginx/resources/site.rb
nginx: reload instead of restart on most config changes
[chef.git] / cookbooks / nginx / resources / site.rb
index 4037e7dac103696fe96dd3a4fcb276fd3c26f1b6..8ac81adcff402ca4401c815646b7a90cc5a5cec5 100644 (file)
@@ -1,8 +1,8 @@
 #
-# Cookbook Name:: nginx
+# Cookbook:: nginx
 # Resource:: nginx_site
 #
-# Copyright 2015, OpenStreetMap Foundation
+# Copyright:: 2015, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 
 default_action :create
 
-property :site, :kind_of => String, :name_attribute => true
+property :site, :kind_of => String, :name_property => true
 property :directory, :kind_of => String
 property :cookbook, :kind_of => String
 property :template, :kind_of => String, :required => true
 property :variables, :kind_of => Hash, :default => {}
-property :restart_nginx, :kind_of => [TrueClass, FalseClass], :default => true
+property :reload_nginx, :kind_of => [TrueClass, FalseClass], :default => true
 
 action :create do
   declare_resource :template, conf_path do
@@ -54,5 +54,5 @@ action_class do
 end
 
 def after_created
-  notifies :restart, "service[nginx]" if restart_nginx
+  notifies :reload, "service[nginx]" if reload_nginx
 end