feat: Initial code
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
0e18170cdf
commit
fc59b4f9a5
18 changed files with 478 additions and 1 deletions
17
ansible/roles/certbot/tasks/main.yml
Normal file
17
ansible/roles/certbot/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: Check requirements
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- certbot_email is defined
|
||||
- certbot_domain is defined
|
||||
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: certbot
|
||||
|
||||
- name: Request certificate
|
||||
ansible.builtin.command:
|
||||
cmd: >-
|
||||
certbot certonly --standalone -n --agree-tos
|
||||
--email {{ certbot_email }} -d {{ certbot_domain }}
|
||||
creates: /etc/letsencrypt/live/{{ certbot_domain }}/fullchain.pem
|
Loading…
Add table
Add a link
Reference in a new issue