Add maintenance page to nginx default recipe

This commit is contained in:
Basti 2019-05-07 15:41:27 +02:00
parent 9811490aad
commit 36a50489d0
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67
2 changed files with 16 additions and 0 deletions

View File

@ -60,6 +60,22 @@ cookbook_file "#{node['nginx']['dir']}/conf.d/tls_config.conf" do
notifies :restart, 'service[nginx]' notifies :restart, 'service[nginx]'
end end
directory node["nginx"]["user_home"] do
owner node["nginx"]["user"]
group node["nginx"]["group"]
action :create
recursive true
end
# Maintenance page, to be copied or served when putting things in maintenance
# mode
cookbook_file "#{node["nginx"]["user_home"]}/maintenance.html" do
source "maintenance.html"
owner node['nginx']['user']
group node['nginx']['group']
mode "0640"
end
unless node.chef_environment == "development" unless node.chef_environment == "development"
include_recipe 'kosmos-base::firewall' include_recipe 'kosmos-base::firewall'