-
Notifications
You must be signed in to change notification settings - Fork 23.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable templating not working correctly when delegating #46600
Comments
Files identified in the description: If these files are inaccurate, please update the |
Hello, I think I have the same or related issue when switching from 2.6.5 to 2.7.0. Playbook: - hosts: vms
gather_facts: false
tasks:
- debug:
var: item
delegate_to: '{{ item.node }}'
loop: '{{ mylist }}' Inventory: all:
children:
vms:
hosts:
target1:
mylist: [{ node: "node1", vmid: 103 }]
target2:
mylist: [{ node: "node2", vmid: 104 }]
cluster:
hosts:
node1:
node2: Result with 2.6.5 (correct) :
Result with 2.7.0 (broken) :
In 2.7.0 both items are the same although the variable looped-on is not the same on each host. Regards, |
I can confirm this issue. |
I can also confirm. This is a real problem. CODE
OUTPUT
|
2.7 is unusable with any delegate_to field We got a high number of reports due to this bug on https://github.com/kubernetes-incubator/kubespray/ |
have you checked with 2.7.1 ? |
Only exclude buggy Ansible v2.7.0 (ansible/ansible#46600 (comment)) Fixup #3589
SUMMARY
When looping through a list of variables and delegating to a templated host, only the first host's variables are templated correctly.
ISSUE TYPE
COMPONENT NAME
lib/ansible/vars/manager.py
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: