Move the Gandi DNS hook for certbot to the kosmos-base cookbook

This commit is contained in:
Greg Karékinian 2019-03-14 18:01:29 +01:00
parent 65482f09c3
commit f12ddefec8
3 changed files with 7 additions and 7 deletions

View File

@ -34,13 +34,6 @@ file "/etc/letsencrypt/renewal-hooks/post/prosody" do
group "root" group "root"
end end
gandi_api_data_bag_item = data_bag_item('credentials', 'gandi_api_5apps')
template "/root/letsencrypt_hook.sh" do
variables gandi_api_key: gandi_api_data_bag_item["key"]
mode 0770
end
# Generate a Let's Encrypt cert (only if no cert has been generated before). # Generate a Let's Encrypt cert (only if no cert has been generated before).
# The renew cron will take care of renewing # The renew cron will take care of renewing
execute "letsencrypt cert for 5apps xmpp" do execute "letsencrypt cert for 5apps xmpp" do

View File

@ -25,3 +25,10 @@ systemctl reload nginx
owner "root" owner "root"
group "root" group "root"
end end
gandi_api_data_bag_item = data_bag_item('credentials', 'gandi_api_5apps')
template "/root/gandi_dns_certbot_hook.sh" do
variables gandi_api_key: gandi_api_data_bag_item["key"]
mode 0770
end