Debian Codegraph @

test/integration/targets/loop_control/label.yml

raw
1 - name: loop_control/label https://github.com/ansible/ansible/pull/36430
2 hosts: localhost
3 gather_facts: false
4 tasks:
5 - set_fact:
6 loopthis:
7 - name: foo
8 label: foo_label
9 - name: bar
10 label: bar_label
11
12 - name: check that item label is updated each iteration
13 debug:
14 msg: "{{ looped_var.name }}"
15 with_items: "{{ loopthis }}"
16 loop_control:
17 loop_var: looped_var
18 label: "looped_var {{ looped_var.label }}"
19 #
20 # - assert:
21 # that:
22 # - "output.results[0]['_ansible_item_label'] == 'looped_var foo_label'"
23 # - "output.results[1]['_ansible_item_label'] == 'looped_var bar_label'"