From b1513bcbebfc4448fa974960e9e3d814c73525ee Mon Sep 17 00:00:00 2001 From: Wolfgang Medina-Erhardt Date: Mon, 28 Aug 2023 16:10:19 +0200 Subject: [PATCH] Fix apache/nginx switch behavior --- meta/main.yaml | 2 +- tasks/main.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/main.yaml b/meta/main.yaml index 78517da..e36f743 100644 --- a/meta/main.yaml +++ b/meta/main.yaml @@ -2,7 +2,7 @@ dependencies: - role: dehydrated - role: nginx - when: inventory_hostname in groups.nginx + when: inventory_hostname in groups.nginx or not inventory_hostname in groups.apache - role: apache when: inventory_hostname in groups.apache - role: oauth2_proxy diff --git a/tasks/main.yaml b/tasks/main.yaml index 9f05537..ce62c94 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -7,8 +7,8 @@ - name: Install Nginx template ansible.builtin.include_tasks: nginx.yaml - when: inventory_hostname in groups.nginx + when: (inventory_hostname in groups.nginx) | default(True) - name: Install Apache template ansible.builtin.include_tasks: apache.yaml - when: inventory_hostname in groups.apache + when: (inventory_hostname in groups.apache) | default(False)