mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Don't try to restart a service, when no service is defined.
This commit is contained in:
parent
3f1a802d71
commit
320e1a0e98
@ -19,7 +19,7 @@ certbot_certs: []
|
||||
# - example3.com
|
||||
certbot_create_command: "{{ certbot_script }} certonly --standalone --noninteractive --agree-tos --email {{ cert_item.email | default(certbot_admin_email) }} -d {{ cert_item.domains | join(',') }}"
|
||||
certbot_create_standalone_stop_services:
|
||||
- nginx
|
||||
# - nginx
|
||||
# - apache
|
||||
# - varnish
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
when: not letsencrypt_cert.stat.exists
|
||||
when: not letsencrypt_cert.stat.exists and item != None
|
||||
with_items: "{{ certbot_create_standalone_stop_services }}"
|
||||
|
||||
- name: Generate new certificate if one doesn't exist.
|
||||
@ -19,5 +19,5 @@
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
when: not letsencrypt_cert.stat.exists
|
||||
when: not letsencrypt_cert.stat.exists and item != None
|
||||
with_items: "{{ certbot_create_standalone_stop_services }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user