# playbook variables defined in includes from vars\_files: not usable throughout the playbook., regression from 1.7.2 to 1.8.2

**URL:** <https://forum.ansible.com/t/playbook-variables-defined-in-includes-from-vars-files-not-usable-throughout-the-playbook-regression-from-1-7-2-to-1-8-2/17066>\
**Category:** Ansible Project\
**Created:** [December 15, 2014, 4:25pm UTC](https://forum.ansible.com/t/playbook-variables-defined-in-includes-from-vars-files-not-usable-throughout-the-playbook-regression-from-1-7-2-to-1-8-2/17066 "2014-12-15T16:25:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Tryggveson](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jan\_Tryggveson](https://forum.ansible.com/u/Jan_Tryggveson)\
**Post date:** [December 15, 2014, 4:25pm UTC](https://forum.ansible.com/t/playbook-variables-defined-in-includes-from-vars-files-not-usable-throughout-the-playbook-regression-from-1-7-2-to-1-8-2/17066/1 "2014-12-15T16:25:31Z")

</div>

The almost minimal example below works fine in ansible 1.7.2 but does not give same and expected result in 1.8.2.

In short what this script is doing is to increment a counter in the hosts\_names.yml file whenever the variable system\_upgrade equals ‘True’.  
This works fine with ansible 1.7.2 but on 1.8.2 a default value I use for the variable that should be used if the file hosts\_names.yml doesn’t exist partly take precedance over the value read from the file.

The playbook is invoked with eighter of these two command lines:  
ansible-playbook sample.yml -u msp --extra-vars “userid=msp system\_upgrade=False”  
ansible-playbook sample.yml -u msp --extra-vars “userid=msp system\_upgrade=True”

If someone interested I can supply a tar file with the complete sample project.
