Variables declared as an array in an external file. Need to read these variables recursively in the playbook during play for multiple records. Request to suggest right looping to use in Ansible playbook.
Currently able to get the item and not item.[variable].
Playbook:
---
- hosts: 127.0.0.1
gather_facts: no
tasks:
- debug:
var: "{{ item }}"
with_lines: cat array.yaml
$ cat array.yaml
- { name: user1, uid: 1001, env: dev, app: app1 }
- { name: user2, uid: 1002, env: cit, app: app2 }