summaryrefslogtreecommitdiff
path: root/roles/certbot/files
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-01-06 18:57:53 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2024-01-06 18:57:53 +0000
commitce18a1206c9e6ca74177c8ca16e42efae934c00f (patch)
treebc9c2dd4f50aca92c7759bf0cd518a984f2ed340 /roles/certbot/files
parent6c781bb8b9b5dea1f3cdb75a6cbde2b9e8942e8c (diff)
downloadinfra-ce18a1206c9e6ca74177c8ca16e42efae934c00f.tar.gz
infra-ce18a1206c9e6ca74177c8ca16e42efae934c00f.tar.bz2
infra-ce18a1206c9e6ca74177c8ca16e42efae934c00f.zip
Make certbot a role
Diffstat (limited to 'roles/certbot/files')
-rw-r--r--roles/certbot/files/certbot.service6
-rw-r--r--roles/certbot/files/certbot.timer10
2 files changed, 16 insertions, 0 deletions
diff --git a/roles/certbot/files/certbot.service b/roles/certbot/files/certbot.service
new file mode 100644
index 0000000..bea307c
--- /dev/null
+++ b/roles/certbot/files/certbot.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Let's Encrypt renewal
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/certbot renew --agree-tos --deploy-hook "systemctl reload nginx"
diff --git a/roles/certbot/files/certbot.timer b/roles/certbot/files/certbot.timer
new file mode 100644
index 0000000..565b4ee
--- /dev/null
+++ b/roles/certbot/files/certbot.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Renewal of Let's Encrypt's certificates
+
+[Timer]
+OnCalendar=daily
+OnCalendar=0/12:12:00
+Persistent=true
+
+[Install]
+WantedBy=timers.target