Revert "Switch certbot to the Ubuntu packages instead of the Git repo"

This reverts commit 019bf85ecc.
This commit is contained in:
Greg Karékinian
2019-01-24 17:47:32 +01:00
parent a2b589003b
commit 8e01bf58ca
10 changed files with 37 additions and 28 deletions

View File

@@ -7,18 +7,14 @@
# All rights reserved - Do Not Redistribute
#
# Install certbot and set up hooks
apt_repository "certbot" do
uri "http://ppa.launchpad.net/certbot/certbot/ubuntu"
distribution node["lsb"]["codename"]
components ["main"]
keyserver "keyserver.ubuntu.com"
key "7BF576066ADA65728FC7E70A8C47BE8E75BCA694"
git "/usr/local/certbot" do
repository "https://github.com/certbot/certbot"
action :sync
revision "v0.26.1"
user "root"
group "root"
end
package "certbot"
letsencrypt_renew_hook = <<-EOF
#!/usr/bin/env bash
@@ -54,12 +50,10 @@ file "/usr/local/bin/letsencrypt_renew_hook" do
group "root"
end
unless node.chef_environment == "development"
cron "renew Let's Encrypt certificates" do
minute "0"
hour "4"
mailto "ops@5apps.com"
# The post hook is only executed if a cert has been renewed
command "certbot renew --renew-hook letsencrypt_renew_hook -n 1> /dev/null"
end
cron "renew Let's Encrypt certificates" do
minute "0"
hour "4"
mailto "logs@5apps.com"
# The hook is only executed if a cert has been renewed
command "/usr/local/certbot/certbot-auto renew --deploy-hook letsencrypt_renew_hook -n 1> /dev/null"
end