# Passing a VAR Between Playbook Tasks

**URL:** <https://forum.ansible.com/t/passing-a-var-between-playbook-tasks/45203>\
**Category:** Get Help\
**Created:** [January 27, 2026, 8:23pm UTC](https://forum.ansible.com/t/passing-a-var-between-playbook-tasks/45203 "2026-01-27T20:23:24Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [January 28, 2026, 2:13am UTC](https://forum.ansible.com/t/passing-a-var-between-playbook-tasks/45203/12 "2026-01-28T02:13:21Z")

</div>

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!

---

_[View the full topic](https://forum.ansible.com/t/passing-a-var-between-playbook-tasks/45203)._
