playbook_vars_root doesn't work for playbook imports #34239
Labels
affects_2.4
This issue/PR affects Ansible v2.4
bug
This issue/PR relates to a bug.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
ISSUE TYPE
COMPONENT NAME
Core/Variable manager
ANSIBLE VERSION
But it also doesn't work on 2.4.2 and current devel.
CONFIGURATION
N/A
OS / ENVIRONMENT
Ubuntu 17.10
SUMMARY
playbook_vars_root configuration doesn't work at all. It always work as if it is set to
bottom
, which was the default in2.4.0
by mistake. In 2.4.1 the default should've been fixed to betop
again, as it was in <=2.3, but it's not. It's stillbottom
and configuringplaybook_vars_root = top
, doesn't make a difference, the setting is just ignored. I also tried using the environment variableANSIBLE_PLAYBOOK_VARS_ROOT=top
, but still the same problem.STEPS TO REPRODUCE
Create the following file structure:
With the following content:
EXPECTED RESULTS
If we run the
top/top.yml
playbook on 2.3 we would get the expected results where only thetop
var will be set andprecedence=top
:ACTUAL RESULTS
But, if we run this on Ansible 2.4/2.5 (this is 2.4.3 from stable-2.4 branch):
The same thing happens if we set
ANSIBLE_PLAYBOOK_VARS_ROOT=top
or to any value:The outcome is exactly the same in we configure
playbook_vars_root = top
inansible.cfg
.The conclusion is that
playbook_vars_root
/ANSIBLE_PLAYBOOK_VARS_ROOT
is currently broken.The text was updated successfully, but these errors were encountered: