Skip to content

Commit

Permalink
fix(inv): only get modules from roles valid for host in `GetModulesFo…
Browse files Browse the repository at this point in the history
…rHost()`
  • Loading branch information
tjhop committed May 17, 2024
1 parent 72e5e2a commit afd9f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ func (i *Inventory) GetModulesForHost(host string) []Module {

if h, found := i.GetHost(host); found {
// get modules from all roles host is assigned
for _, r := range h.roles {
mods = append(mods, i.GetModulesForRole(r)...)
for _, r := range i.GetRolesForHost(host) {
mods = append(mods, i.GetModulesForRole(r.String())...)
}

// get raw host modules
Expand Down

0 comments on commit afd9f03

Please sign in to comment.