Use correct delegate_to hostnames in loops (#59659)

Fixes #59650
pull/59767/head
Martin Krizek 5 years ago committed by GitHub
parent 127bd67f6e
commit fd899956b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Correctly handle delegate_to hostnames in loops (https://github.com/ansible/ansible/issues/59650)

@ -546,7 +546,7 @@ class VariableManager:
if item is not None:
vars_copy[item_var] = item
templar.set_available_variables = vars_copy
templar.available_variables = vars_copy
delegated_host_name = templar.template(task.delegate_to, fail_on_undefined=False)
if delegated_host_name != task.delegate_to:
cache_items = True

Loading…
Cancel
Save