Install certbot from the direct download when on 15.04

It does not have a ppa release. Add a cron job for renewal. When using
the PPA a Systemd timer is part of the package
This commit is contained in:
Greg Karékinian 2019-03-18 16:52:05 +01:00
parent 17f1b2a20a
commit 5fa0fa661b

View File

@ -9,11 +9,25 @@
# Install certbot and set up hooks # Install certbot and set up hooks
# Remove the unless/else when we get rid of dev, running 15.04. No ppa for it
unless node["lsb"]["codename"] == "vivid"
apt_repository "certbot" do apt_repository "certbot" do
uri "ppa:certbot/certbot" uri "ppa:certbot/certbot"
end end
package "certbot" package "certbot"
else
remote_file "/usr/bin/certbot" do
source "https://dl.eff.org/certbot-auto"
mode 0755
end
cron "renew Let's Encrypt certificates" do
hour "4"
mailto "logs@5apps.com"
command "/usr/bin/certbot -q renew"
end
end
directory "/etc/letsencrypt/renewal-hooks" do directory "/etc/letsencrypt/renewal-hooks" do
recursive true recursive true