17 lines
454 B
YAML
17 lines
454 B
YAML
---
|
|
- 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
|