* Add another become

This commit is contained in:
Lyz 2018-03-07 17:51:33 +01:00
parent b8f221880b
commit d5aa1fce30
No known key found for this signature in database
GPG Key ID: 6C7D7C1612CDE02F

View File

@ -1,5 +1,6 @@
---
- name: Check if certificate already exists.
become: True
stat:
path: /etc/letsencrypt/live/{{ cert_item.domains | first }}/cert.pem
register: letsencrypt_cert
@ -22,7 +23,5 @@
service:
name: "{{ item }}"
state: started
when:
- not letsencrypt_cert.stat.exists
- certbot_create_standalone_stop_services
when: not letsencrypt_cert.stat.exists
with_items: "{{ certbot_create_standalone_stop_services }}"