From 6336642bde547a447026bf3c9f8478acc1dabfb5 Mon Sep 17 00:00:00 2001 From: Klaas Demter Date: Mon, 20 Mar 2023 16:16:37 +0100 Subject: [PATCH 1/2] Fix dispatch to use general vars instead of specific hostvars --- roles/dispatch/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dispatch/tasks/main.yml b/roles/dispatch/tasks/main.yml index c2a4c0778..472fd8a49 100644 --- a/roles/dispatch/tasks/main.yml +++ b/roles/dispatch/tasks/main.yml @@ -4,7 +4,7 @@ name: "{{ __role.role }}" apply: tags: "{{ __role.tags }}" - when: hostvars[inventory_hostname][__role.var] is defined + when: vars[__role.var] is defined tags: always loop: "{{ controller_configuration_dispatcher_roles }}" loop_control: From d9d13d01bec34009262c1e75a0414f28e88461e6 Mon Sep 17 00:00:00 2001 From: Tom Page Date: Mon, 20 Mar 2023 16:38:22 +0000 Subject: [PATCH 2/2] Add changelog --- changelogs/fragments/dispatch_fix.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/fragments/dispatch_fix.yml diff --git a/changelogs/fragments/dispatch_fix.yml b/changelogs/fragments/dispatch_fix.yml new file mode 100644 index 000000000..d70caf29f --- /dev/null +++ b/changelogs/fragments/dispatch_fix.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Ensures vars get loaded properly by dispatch role +...