Skip to content

Commit

Permalink
Fix dispatch to use general vars instead of specific hostvars (#547)
Browse files Browse the repository at this point in the history
* Fix dispatch to use general vars instead of specific hostvars

* Add changelog

---------

Co-authored-by: Tom Page <tompage1994@hotmail.co.uk>
  • Loading branch information
Klaas- and Tompage1994 authored Mar 20, 2023
1 parent 3cd463b commit 3839b01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelogs/fragments/dispatch_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- Ensures vars get loaded properly by dispatch role
...
2 changes: 1 addition & 1 deletion roles/dispatch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3839b01

Please sign in to comment.