Create a nginx_certbot_site resource to remove duplication
It creates a folder, the nginx vhost for certbot and HTTP redirects, and also runs certbot and recreates the nginx vhost that includes the TLS cert
This commit is contained in:
@@ -108,10 +108,6 @@ action :enable do
|
||||
end
|
||||
|
||||
if rpc_proxy_port
|
||||
unless node.chef_environment == "development"
|
||||
include_recipe "kosmos-parity::letsencrypt"
|
||||
end
|
||||
|
||||
include_recipe "kosmos-nginx"
|
||||
|
||||
hostname = node['kosmos-parity']['hostname']
|
||||
@@ -129,8 +125,12 @@ action :enable do
|
||||
notifies :reload, 'service[nginx]', :delayed
|
||||
end
|
||||
|
||||
nginx_site "#{parity_service}" do
|
||||
nginx_site parity_service do
|
||||
action :enable
|
||||
end
|
||||
|
||||
nginx_certbot_site hostname do
|
||||
site parity_service
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user