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