mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-20 09:11:43 +02:00
This plugin supports issuing/renewing certificates without needing to stop/start Apache's daemon. This change also adds a variable to allow override default letsencrypt config directory (/etc/letsencrypt).
10 lines
328 B
YAML
10 lines
328 B
YAML
---
|
|
- name: Check if certificate already exists.
|
|
stat:
|
|
path: "{{ certbot_config_dir }}/live/{{ cert_item.domains | first | replace('*.', '') }}/cert.pem"
|
|
register: letsencrypt_cert
|
|
|
|
- name: Generate new certificate if one doesn't exist.
|
|
command: "{{ certbot_create_command }}"
|
|
when: not letsencrypt_cert.stat.exists
|