X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/56df259055ae541d1f31b8502c549cb84f74778e..862701adfbd725c676875218f0aadde62fc9c264:/cookbooks/imagery/resources/site.rb diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index dfda20da1..88b122097 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -20,9 +20,10 @@ default_action :create property :name, String +property :aliases, [String, Array], :default => [] action :create do - directory "/srv/imagery/#{name}" do + directory "/srv/#{name}" do owner "root" group "root" mode 0755 @@ -31,6 +32,11 @@ action :create 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