From 2133c1ff3ee885916047bf7519d3a44248184585 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 28 Apr 2024 21:25:20 -0700 Subject: [PATCH] certbot installation --- .../ansible/tasks/certbot-installation.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 infra/static-vultr/ansible/tasks/certbot-installation.yml diff --git a/infra/static-vultr/ansible/tasks/certbot-installation.yml b/infra/static-vultr/ansible/tasks/certbot-installation.yml new file mode 100644 index 0000000..602aadf --- /dev/null +++ b/infra/static-vultr/ansible/tasks/certbot-installation.yml @@ -0,0 +1,19 @@ +- name: Install required packages + pip: + name: + - certbot + - certbot-nginx + executable: pip3 +- name: Register + shell: | + certbot -n register --agree-tos -m dev@shockrah.xyz,temper@temper.tv + touch /etc/letsencrypt/.registered + args: + creates: /etc/letsencrypt/.registered +- name: Setup cron job for renewal every monday at 1 am + cron: + name: certbot-renewal + job: "bash -lc 'certbot -q renew'" + minute: 0 + hour: 1 + weekday: 1