This sets which playbook dirs will be used as a root to process vars plugins, which includes finding host_vars/group_vars The top option follows the traditional behaviour of using the top playbook in the chain to find the root directory. The bottom option follows the 2.4.0 behaviour of using the current playbook to find the root directory. The all option examines from the first parent to the current playbook.
Despite my efforts, I can’t seem to get anything else than the “bottom” behaviour.
We have discussed this in the Core Team Meeting on Jan 11, 2018.
After looking at the code previous to 2.4, and discussing what our expectations are, we have decided that the previous behavior was a bug, and we will not be adding functionality to mimic the pre 2.4 behavior.
keep a ‘stack’ of playbook paths, starting with the initial playbook and ending with the ‘current’ one
group/host_vars processing should got through each path in order
So ‘initial playbook’ and the ‘current playbook’ adjacent group/host_vars will all be read (as well as any intermediate ones). This is still a change from previous behaviour but we believe this is the ‘most’ correct way of dealing with the variables.
The PLAYBOOK_VARS_ROOT config doesn’t change anything (it’s only task related not playbook related). Shortly >=2.4.0 breaks the backward compatibility for including playbooks (maybe the caption of this issue should be changed also).