Added tasks that configure certbot
This commit is contained in:
42
roles/bootstrap/tasks/configure_core/certbot.yml
Normal file
42
roles/bootstrap/tasks/configure_core/certbot.yml
Normal file
@@ -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
|
Reference in New Issue
Block a user