Hello experts,
This is the following ansible directory structure I have:

├── environments                                 
│   └── azure_sandbox                            
├── filter_plugins                               
├── group_vars                                   
│   ├── all.yml                                  
│   └── uswest_sandbox.yml                       
├── hierarchy.README                             
├── host_vars                                    
├── library                                      
├── roles                                        
│   ├── cassandra                                
│   ├── common                                   
│   │   ├── default                              
│   │   ├── files                                
│   │   ├── handlers                             
│   │   │   └── main.yml                         
│   │   ├── meta                                 
│   │   ├── tasks                                
│   │   │   ├── Debian.yml                       
│   │   │   ├── docker_base_centos7.yml          
│   │   │   ├── main.yml                         
│   │   │   ├── RedHat.yml                       
│   │   │   ├── rh6.yml                          
│   │   │   ├── rh7.yml                          
│   │   │   ├── rh_java.yml                      
│   │   │   └── rh_pytools.yml                   
│   │   ├── templates                            
│   │   │   ├── docker-defaults.j2               
│   │   │   └── docker-init.j2                   
│   │   └── vars                                 
│   │       └── main.yml                         
│   ├── docker                                   
│   │   ├── handlers                             
│   │   │   └── main.yml                         
│   │   ├── meta                                 
│   │   ├── tasks                                
│   │   │   ├── Debian.yml                       
│   │   │   ├── main.yml                         
│   │   │   ├── RedHat.yml                       
│   │   │   ├── rh6.yml                          
│   │   │   ├── rh7.yml                          
│   │   │   └── rh_pytools.yml                   
│   │   ├── templates                            
│   │   │   ├── docker-defaults.j2               
│   │   │   └── docker-init.j2                   
│   │   └── vars                                 
│   │       └── main.yml                         
│   ├── elasticsearch                            
│   ├── kafka                                    
│   ├── netty                                    
│   ├── nginx                                    
│   │   ├── handlers                             
│   │   │   └── main.yml                         
│   │   ├── meta                                 
│   │   ├── tasks                                
│   │   │   ├── Debian.yml                       
│   │   │   ├── main.yml                         
│   │   │   ├── RedHat.yml                       
│   │   │   ├── rh6.yml                          
│   │   │   └── rh7.yml                          
│   │   ├── templates                            
│   │   │   ├── docker-defaults.j2               
│   │   │   └── docker-init.j2                   
│   │   └── vars                                 
│   │       └── main.yml                         
│   ├── storm_deploy                             
│   ├── storm_supervisor                         
│   └── zookeeper                                
└── top_level_playbooks                          
    ├── top_level_base.yml                       
    ├── top_level_docker.yml                     
    └── top_level_java.yml                       

Here's the inventory file:

# uswest: sandbox: UI
[sandbox_webtier_uswest]
<redacted>
#----------------------------------------

# uswest: sandbox: REST Layer
[sandbox_resttier_uswest]
<redacted>
#----------------------------------------

# uswest: sandbox: Processing Layer: Kafka
#-----------------------------------------
[sandbox_kafka_uswest]
<redacted>

# uswest: sandbox: Processing Layer: Storm
#------------------------------------------
[sandbox_storm_uswest]
<redacted>

# uswest: sandbox: Processing Layer: Zookeeper
#--------------------------------------------
[sandbox_zk_uswest]
<redacted>

# uswest: sandbox: Processing Layer Main
#----------------------------------------
[sandbox_processingtier_uswest:children]
sandbox_kafka_uswest
sandbox_storm_uswest
sandbox_zk_uswest

# uswest: sandbox: Storage Layer: Cassandra
#------------------------------------------
[sandbox_cass_uswest]
<redacted>

# uswest: sandbox: Storage Layer: Elasticsearch
# ----------------------------------------------
[sandbox_es_uswest]
10.0.4.5

# uswest: sandbox: Storage Layer Main
# ------------------------------------
[sandbox_storagetier_uswest:children]
sandbox_cass_uswest
sandbox_es_uswest

# uswest: sandbox: Main
# ----------------------
[uswest_sandbox:children]
sandbox_webtier_uswest
sandbox_resttier_uswest
sandbox_processingtier_uswest
sandbox_storagetier_uswest

Now, I have defined group_vars for "uswest_sandbox" group of groups in the 
group_vars folder
# group_vars/uswest_sandbox
---
registryurl: <redacted>
registry: <redacted>
registrySeparator: <redacted>"
registryUser:<redacted>
registryPass: <redacted>
registryEmail: <redacted>
userName:<redacted>

With this, when I run the ansible playboox, the group_vars/uswest_sandbox 
is not loaded/read.

Here's the yml file in /roles/common/tasks where I am referring the vars

*- name: "Perform docker login to registry running on sandbox-bastion node"*
*  shell: docker login --username={{ registryUser }} --password={{ 
registryPass }} --email={{ registryEmail }} {{ registryurl }}*

So, I would expect Anisble to look for the vars in the local vars folder 
i.e. roles/common/vars, and then look at top level directory i.e. 
group_vars/uswest_sandbox.yml
However ansible run gives the following error: 
*"One or more undefined variables: 'registryUser' is undefined"*


I might me off with my understanding here. Any help is appreciated.

*Ansible version:*
*ansible 1.9.1*
*  configured module search path = /opt/ansible_cradle/custom_modules*

Thanks
Satish

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/14df5c00-9bfb-4ffb-8c12-d8063d588950%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to