From 3f54b98177be6add37d09d2801cb7b929cdcd92f Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Wed, 23 Jul 2025 15:39:37 -0400 Subject: [PATCH] Added tasks that configure certbot --- .../tasks/configure_core/certbot.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 roles/bootstrap/tasks/configure_core/certbot.yml diff --git a/roles/bootstrap/tasks/configure_core/certbot.yml b/roles/bootstrap/tasks/configure_core/certbot.yml new file mode 100644 index 0000000..72807d6 --- /dev/null +++ b/roles/bootstrap/tasks/configure_core/certbot.yml @@ -0,0 +1,42 @@ +--- +- name: Create a settings file for Porkbun DNS API + become: yes + become_method: sudo + template: + src: certbot/porkbun.ini.j2 + dest: "{{ web_root }}/porkbun.ini" + force: yes + backup: yes + register: porkbun_api_created +- name: Initiate DNS Acme challenge using Porkbun API plugin + become: yes + become_method: sudo + command: + argv: + - certbot + - certonly + - --non-interactive + - --agree-tos + - --email=ajt95@prole.biz + - --preferred-challenges=dns + - --authenticator=dns-porkbun + - "--dns-porkbun-credentials={{ web_root }}/porkbun.ini" + - --dns-porkbun-propagation-seconds=60 + - -d="sukaato.moe" + when: porkbun_api_created.rc == 0 +- name: Initiate DNS Acme challenge using Porkbun API plugin + become: yes + become_method: sudo + command: + argv: + - certbot + - certonly + - --non-interactive + - --agree-tos + - --email=ajt95@prole.biz + - --preferred-challenges=dns + - --authenticator=dns-porkbun + - "--dns-porkbun-credentials={{ web_root }}/porkbun.ini" + - --dns-porkbun-propagation-seconds=60 + - -d="*.sukaato.moe" + when: porkbun_api_created.rc == 0 \ No newline at end of file