# Template not updated with correct values from group\_vars file

**URL:** <https://forum.ansible.com/t/template-not-updated-with-correct-values-from-group-vars-file/16531>\
**Category:** Ansible Project\
**Created:** [October 16, 2014, 10:30am UTC](https://forum.ansible.com/t/template-not-updated-with-correct-values-from-group-vars-file/16531 "2014-10-16T10:30:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subramanian\_Olagappa](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Subramanian\_Olagappa](https://forum.ansible.com/u/Subramanian_Olagappa)\
**Post date:** [October 16, 2014, 10:30am UTC](https://forum.ansible.com/t/template-not-updated-with-correct-values-from-group-vars-file/16531/1 "2014-10-16T10:30:53Z")

</div>

Hi All,

I have a playbook which copy application.proprties with db.username and db.password.

I have qa env and qa1 is a cluster with app and ui server. The hosts file ([hosts.qa](http://hosts.qa)) is as per the best practises mentioned in [docs.ansible.com](http://docs.ansible.com) site. I have similar hosts file for dev ( hosts.dev )

I have group\_vars file for qa and qa1 with db.usernamd and db.password values. Same for dev and dev1 groups

> ansible-playbook -i inventory/[hosts.qa](http://hosts.qa) --limit qa1 site.yml

When I run the playbook, with --limit qa1, the application properties template is not updated with qa1 group\_vars file values, instead it has “qa” as db\_username and db\_password. The same works fine for --limit dev1

Has anyone faced this problem ?

Thanks,  
Olga

ansible 1.7.2  
Centos 6.5

**site.yml**

---

<div class="post-metadata">

**Author:** ![Subramanian\_Olagappa](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Subramanian\_Olagappa](https://forum.ansible.com/u/Subramanian_Olagappa)\
**Post date:** [October 19, 2014, 2:20pm UTC](https://forum.ansible.com/t/template-not-updated-with-correct-values-from-group-vars-file/16531/2 "2014-10-19T14:20:02Z")

</div>

Hi,

I went thru the docos on variable scope and was able to identify the issue:

[qa:children]  
qa1

Solved my problem !

Thanks,  
Olga
