Hello all,
I’m trying to update my playbooks with the simplified LOOP new syntax, every went well until I tried to remove WITH_SUBELEMENTS loops. My dictionary looks like this
soft:
- version: X.X.X.X
options: - command: “something”
- command: “something”
- command: “something”
- command: “something”
I need to reference the version key whille looping against options command list and I can’t figure out how to do this using loop: “{{ query(‘subelements’, soft, ‘options’, skip_missing=True’) }}” ?
Below is the old loop:
command: do something item[1].command “item[0].version”
with_subelements:
- “{{ soft }}”
- options
Any clue? Thanks by advance