diff --git a/tasks/main.yml b/tasks/main.yml index 52f9c72..415a320 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,6 +11,12 @@ register: certificate_folder loop: "{{ vhosts }}" +- name: Evaluate if need certificate + set_fact: + need_certificate: true + when: not item.stat.exists + loop: "{{ certificate_folder }}" + - name: Ensure certificate is created include_tasks: configure_certificate.yml - when: not certificate_folder.stat.exists + when: need_certificate