Don't try to restart a service, when no service is defined.

This commit is contained in:
Tim Bultmann
2018-01-23 11:02:34 +01:00
parent 3f1a802d71
commit 320e1a0e98
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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 }}"