X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/480d54a8957ad07025a37ecb63181be2a5e6d129..1fb771a75fb2aa2932b5afce2b424e3f86791bc2:/cookbooks/nginx/recipes/default.rb diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index 480937407..a55dc14be 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -17,18 +17,16 @@ # limitations under the License. # -package "nginx" +include_recipe "apt" +include_recipe "munin" -resolvers = node[:networking][:nameservers].map do |resolver| - IPAddr.new(resolver).ipv6? ? "[#{resolver}]" : resolver -end +package "nginx" template "/etc/nginx/nginx.conf" do source "nginx.conf.erb" owner "root" group "root" mode 0o644 - variables :resolvers => resolvers end directory node[:nginx][:cache][:fastcgi][:directory] do @@ -50,7 +48,7 @@ end service "nginx" do action [:enable] # Do not start the service as config may be broken from failed chef run supports :status => true, :restart => true, :reload => true - subscribes :restart, "template[/etc/nginx/nginx.conf]", :immediately + subscribes :restart, "template[/etc/nginx/nginx.conf]" end munin_plugin_conf "nginx" do