# Ansible include tasks and get response.

**URL:** <https://forum.ansible.com/t/ansible-include-tasks-and-get-response/27421>\
**Category:** Ansible Project\
**Created:** [May 1, 2018, 12:00pm UTC](https://forum.ansible.com/t/ansible-include-tasks-and-get-response/27421 "2018-05-01T12:00:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Madushan\_Chathuranga](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Madushan\_Chathuranga](https://forum.ansible.com/u/Madushan_Chathuranga)\
**Post date:** [May 1, 2018, 12:00pm UTC](https://forum.ansible.com/t/ansible-include-tasks-and-get-response/27421/1 "2018-05-01T12:00:27Z")

</div>

Hi,

Is it possible to execute a another yaml file with in a yaml file (import or include) passing arguments and register its output? Or else return it’s output and assign to a variable

Thanks.

---

<div class="post-metadata">

**Author:** ![ali.khawaja](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@ali.khawaja](https://forum.ansible.com/u/ali.khawaja)\
**Post date:** [May 2, 2018, 8:02pm UTC](https://forum.ansible.com/t/ansible-include-tasks-and-get-response/27421/2 "2018-05-02T20:02:11Z")

</div>

Hi,

Is it possible to execute a another yaml file with in a yaml file (import or include) passing arguments and register its output? Or else return it’s output and assign to a variable

Thanks.
