Passing a VAR Between Playbook Tasks

Yes. And .records[0].attachments is also a list, so you may need to loop over it to get them all. Or loop over a filtered subset where content_type = 'text/x-sql' or something like that.

Kudos for using ansible.builtin.debug to see what you’ve registered. Also for including the debug output in the thread. You’d be amazed how often people ask for help with this type of problem without including crucial info like that. Nice asking on your part!

Cheers!

2 Likes