
I try to get a list for all vms : "vm_name : description : id " A simple loop works: - debug: msg: "{{ ovirt_vms | map(attribute='snapshots') | list }}" register: snapshotid2 tags: snapshots2 - debug: msg: "{{ ovirt_vms | map(attribute='name') | list }}" register: name2 tags: snapshots2 - set_fact: toto: "{{ name2.msg[item] }} : {{ snapshotid2.msg[0][0].description }} : {{ snapshotid2.msg[0][0].id }} " with_item: - 0 - 1 register: all_snapshots2 tags: snapshots2 - debug: var: all_snapshots2 tags: snapshots2 Now I want insert a second loop with "with_nested" like so: - set_fact: toto: "{{ name2.msg[item.1] }} : {{ snapshotid2.msg[0].item.0.description }} : {{ snapshotid2.msg[0].item.0.id }} " with_nested: - [ '0', '1'] - [ '1', '0'] but I always have this error: "The error was: 'list object' has no attribute u'0'" How can I do such a thing? -- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr