# Group vars load time

**URL:** <https://forum.ansible.com/t/group-vars-load-time/24199>\
**Category:** Ansible Project\
**Created:** [April 12, 2017, 10:08am UTC](https://forum.ansible.com/t/group-vars-load-time/24199 "2017-04-12T10:08:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fdevillamil](https://avatars.discourse-cdn.com/v4/letter/f/8dc957/32.png) [@fdevillamil](https://forum.ansible.com/u/fdevillamil)\
**Post date:** [April 12, 2017, 10:08am UTC](https://forum.ansible.com/t/group-vars-load-time/24199/1 "2017-04-12T10:08:47Z")

</div>

Hello,

I face a strange behaviour on Ansible 2.2.2, which I didn’t have on 1.9. Inventory group vars seems to be defined after all the vars in my playbook

My inventory:

inventory/  
production/  
production  
group\_vars/  
all.yml

My playbook:

- hosts: all  
vars\_files:

- vars/{{stage}}/frontend/main.yml

- vars/{{stage}}/frontend/{{front\_name}}.yml

- vars/{{stage}}/frontend/{{group\_names[0]}}.yml

stage is defined in inventory/production/group\_vars/all.yml

When I run my playbook, it fails loading my var\_files because stage does not exist.

if I replace my playbook with the following, it works:

- hosts: all  
vars\_files:

- “{{ inventory\_dir }}/group\_vars/all.yml”

- vars/{{stage}}/frontend/main.yml

- vars/{{stage}}/frontend/{{front\_name}}.yml

- vars/{{stage}}/frontend/{{group\_names[0]}}.yml

Best regards,  
Fred
