Template not updated with correct values from group_vars file

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) is as per the best practises mentioned in 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 --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

Hi,

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

[qa:children]
qa1

Solved my problem !

Thanks,
Olga