mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
properly track delegated host in loops
ansible_host can be pulled from inventory and not match inventory_hostname, this can "loose" vars to a new host named by ansible_host vs the delegated host fixes #25770
This commit is contained in:
parent
b6ee9163e3
commit
9d8721dbde
3 changed files with 4 additions and 3 deletions
|
@ -245,7 +245,7 @@ class StrategyBase:
|
|||
return host_list
|
||||
|
||||
def get_delegated_hosts(self, result, task):
|
||||
host_name = result.get('_ansible_delegated_vars', {}).get('ansible_host', None)
|
||||
host_name = result.get('_ansible_delegated_vars', {}).get('ansible_delegated_host', None)
|
||||
if host_name is not None:
|
||||
actual_host = self._inventory.get_host(host_name)
|
||||
if actual_host is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue