I want to target the path variable in this output of Ansible.
ok: [myMachine1] => { "foundFiles": { ... "results": [ { ... "files": [ { ... "path": "/my/first/path", ... } ], }, { ... "files": [ { ... "path": "/my/second/path", ... } } ] } } How can I tell Ansible to target the 'path' variables. I'm trying with:
- debug: msg: "{{ item.files.path }}" with_items: - foundFiles.results But only getting "failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'key'
Thanks guru's.