diff --git a/tasks/configure_certificate.yml b/tasks/configure_certificate.yml index b8bae8b..22a89d4 100644 --- a/tasks/configure_certificate.yml +++ b/tasks/configure_certificate.yml @@ -11,7 +11,7 @@ when: - "'ssl' in item" - item['ssl'] - with_items: "{{ vhosts }}" + loop: "{{ vhosts }}" - name: Start Apache service: diff --git a/tasks/main.yml b/tasks/main.yml index 6b13099..52f9c72 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,6 +9,7 @@ stat: path: "/etc/letsencrypt/archive/{{ item.vhostname }}" register: certificate_folder + loop: "{{ vhosts }}" - name: Ensure certificate is created include_tasks: configure_certificate.yml