Skip to content

Commit 3839b01

Browse files
Klaas-Tompage1994
andauthored
Fix dispatch to use general vars instead of specific hostvars (#547)
* Fix dispatch to use general vars instead of specific hostvars * Add changelog --------- Co-authored-by: Tom Page <tompage1994@hotmail.co.uk>
1 parent 3cd463b commit 3839b01

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelogs/fragments/dispatch_fix.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
bugfixes:
3+
- Ensures vars get loaded properly by dispatch role
4+
...

roles/dispatch/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: "{{ __role.role }}"
55
apply:
66
tags: "{{ __role.tags }}"
7-
when: hostvars[inventory_hostname][__role.var] is defined
7+
when: vars[__role.var] is defined
88
tags: always
99
loop: "{{ controller_configuration_dispatcher_roles }}"
1010
loop_control:

0 commit comments

Comments
 (0)