- development
      - inventory
      - group_vars
         - webservers
            - all.yml
            - secret.yml
         - services
            - all.yml
         - all.yml
      - webservers.yml
   - services.yml

My inventory file looks like 

[webservers]
dev1

[services]
dev1
dev2

I have 2 play-books , webservers.yml which defines a set of roles for the 
webserver hosts to be executed and similarly another playbook services.yml 
for deploying some services. 

When i  try to execute  *"ansible-playbook -i development webservers.yml"* 
 i could able to resolve all the variable defined in the  webservers 
directory under group var. 
But when i try to execute *"ansible-playbook -i development services.yml"* 
 i could *NOT* able to resolve any variable defined in 
*"/group_vars/services/all.yml"*.  But if i keep the same variables in 
"/group_vars/all.yml" the variables are resolving properly.

I have tried removing the folders in the group_vars and specifying all the 
variables in webservers.yml and services.yml . But no luck. 
As per the ansible doc 
<http://docs.ansible.com/intro_inventory.html#splitting-out-host-and-group-specific-data>
 
this should be supported. Could some one help me what is going wrong with 
the setup. 

$ ansible --version
ansible 1.6.6

Regards,
Srinivas

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c79604c9-3bab-417b-9a08-24cb2cb83cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to