# vars within vs. vars passed output ?

**URL:** <https://forum.ansible.com/t/vars-within-vs-vars-passed-output/11657>\
**Category:** Ansible Project\
**Created:** [July 9, 2012, 7:30pm UTC](https://forum.ansible.com/t/vars-within-vs-vars-passed-output/11657 "2012-07-09T19:30:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ansibleguest](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@ansibleguest](https://forum.ansible.com/u/ansibleguest)\
**Post date:** [July 9, 2012, 7:30pm UTC](https://forum.ansible.com/t/vars-within-vs-vars-passed-output/11657/1 "2012-07-09T19:30:08Z")

</div>

There seam to be a difference on the stdout output somehow.  
If the var is passed via hosts file vars into the playbook it is not  
resolved to stdout though it works:

hosts:

[mygroup1:vars]  
product=myproduct

TASK: [command chown -R $product:$product /opt/$product]

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 9, 2012, 7:32pm UTC](https://forum.ansible.com/t/vars-within-vs-vars-passed-output/11657/2 "2012-07-09T19:32:33Z")

</div>

This is expected.

Tasks are created equally for all hosts, so host specific vars get evaluated later.

(For those familiar with the code, this is runner/ **init**.py where that happens)
