mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
add posibility to set a cert name
This commit is contained in:
parent
a49d4e63a1
commit
750597f8fd
@ -10,6 +10,7 @@ certbot_auto_renew_options: "--quiet --no-self-upgrade"
|
|||||||
certbot_create_if_missing: false
|
certbot_create_if_missing: false
|
||||||
certbot_create_method: standalone
|
certbot_create_method: standalone
|
||||||
certbot_admin_email: email@example.com
|
certbot_admin_email: email@example.com
|
||||||
|
certbot_cert_name: ""
|
||||||
certbot_certs: []
|
certbot_certs: []
|
||||||
# - email: janedoe@example.com
|
# - email: janedoe@example.com
|
||||||
# domains:
|
# domains:
|
||||||
@ -19,7 +20,7 @@ certbot_certs: []
|
|||||||
# - example3.com
|
# - example3.com
|
||||||
certbot_create_command: >-
|
certbot_create_command: >-
|
||||||
{{ certbot_script }} certonly --standalone --noninteractive --agree-tos
|
{{ certbot_script }} certonly --standalone --noninteractive --agree-tos
|
||||||
--email {{ cert_item.email | default(certbot_admin_email) }}
|
{% if certbot_cert_name %} --cert-name {{certbot_cert_name}} {%endif%} --email {{ cert_item.email | default(certbot_admin_email) }}
|
||||||
-d {{ cert_item.domains | join(',') }}
|
-d {{ cert_item.domains | join(',') }}
|
||||||
|
|
||||||
certbot_create_standalone_stop_services:
|
certbot_create_standalone_stop_services:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Check if certificate already exists.
|
- name: Check if certificate already exists.
|
||||||
stat:
|
stat:
|
||||||
path: /etc/letsencrypt/live/{{ cert_item.domains | first | replace('*.', '') }}/cert.pem
|
path: /etc/letsencrypt/live/{% if certbot_cert_name %}{{certbot_cert_name}}{% else %}{{ cert_item.domains | first | replace('*.', '') }}{% endif %}/cert.pem
|
||||||
register: letsencrypt_cert
|
register: letsencrypt_cert
|
||||||
|
|
||||||
- name: Stop services to allow certbot to generate a cert.
|
- name: Stop services to allow certbot to generate a cert.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user