property :name, String
action :create do
-
directory "/srv/imagery/#{name}" do
owner "root"
group "root"
mode 0755
end
- nginx_site "#{name}" do
+ 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