Create a resource to get a Let's Encrypt cert with DNS validation
This commit is contained in:
@@ -52,16 +52,17 @@ end
|
||||
end
|
||||
end
|
||||
|
||||
# TODO check if nginx is installed/running on the node
|
||||
file "/etc/letsencrypt/renewal-hooks/deploy/nginx" do
|
||||
content <<-EOF
|
||||
#!/usr/bin/env bash
|
||||
# Reloading nginx is enough to read the new certificates
|
||||
systemctl reload nginx
|
||||
EOF
|
||||
mode 0755
|
||||
owner "root"
|
||||
group "root"
|
||||
if node.run_list.roles.include?("openresty_proxy")
|
||||
file "/etc/letsencrypt/renewal-hooks/post/openresty" do
|
||||
content <<-EOF
|
||||
#!/usr/bin/env bash
|
||||
# Reloading openresty is enough to read the new certificates
|
||||
systemctl reload openresty
|
||||
EOF
|
||||
mode 0755
|
||||
owner "root"
|
||||
group "root"
|
||||
end
|
||||
end
|
||||
|
||||
# include_recipe 'kosmos-base::systemd_emails'
|
||||
|
||||
Reference in New Issue
Block a user