From 9236311180de5c32588e5dd37e43dcc95bae40f9 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Thu, 9 Feb 2023 20:42:32 +0200 Subject: [PATCH] add loop --- tasks/configure_certificate.yml | 2 +- tasks/main.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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