# ansible varibals do not passing to roles that in include\_role

**URL:** <https://forum.ansible.com/t/ansible-varibals-do-not-passing-to-roles-that-in-include-role/33297>\
**Category:** Ansible Project\
**Created:** [July 1, 2020, 6:45pm UTC](https://forum.ansible.com/t/ansible-varibals-do-not-passing-to-roles-that-in-include-role/33297 "2020-07-01T18:45:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meir\_Yanovich](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@Meir\_Yanovich](https://forum.ansible.com/u/Meir_Yanovich)\
**Post date:** [July 1, 2020, 6:45pm UTC](https://forum.ansible.com/t/ansible-varibals-do-not-passing-to-roles-that-in-include-role/33297/1 "2020-07-01T18:45:16Z")

</div>

i have this ansible structure its part of large codebase :  
it seems that when running the main playbook the defaults/main.yml app\_type:game  
don’t pass on to the current\_version.yml and give error  
why it doesn’t use the default var in defaults/main.yml

also when i pass the same variable name from --extra-vars it gives me the same error  
when i print the variable from tasks/main.yml  
it prints the right value  
what is wrong with the include\_role?

`  
C:.  
├───defaults  
│ main.yml  
│  
└───tasks  
main.yml  
current\_version.yml  
legacy\_version.yml

`

`  
main.yml
