group "root"
mode 0644
variables new_resource.to_hash
- # FIXME notifies :reload, "service[nginx]", :delayed
end
end
file "/srv/imagery/nginx/#{site}/layer-#{name}.conf" do
action :delete
- # FIXME notifies :reload, "service[nginx]", :delayed
end
end
nginx_site name do
template "nginx_imagery.conf.erb"
directory "/srv/imagery/#{name}"
+ restart_nginx false
variables new_resource.to_hash
end
end
+
+def after_created
+ notifies :restart, "service[nginx]"
+end
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