1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/inventory
James Cammarata b617d62203 Don't use an unset playbook basedir when searching for hostgroup vars
The flag new_pb_basedir is not being utilized in Inventory._get_hostgroup_vars,
leading to the situation where an inventory with no playbook basedir set will
read host/group vars from the $CWD, regardless of the inventory and/or playbook
relative location. This patch corrects that by not using the playbook basedir
if it is unset (None).

This patch also corrects a bug in which the VariableManager would accumulate
host/group vars files, which could lead to incorrect vars files being used when
playbooks are run from different directories containing their own group/host vars
directories.

Fixes #16953
2016-08-17 16:28:48 -05:00
..
vars_plugins Add python3-compat boilerplate to all .py files in lib/ansible 2015-10-19 18:36:19 -07:00
__init__.py Don't use an unset playbook basedir when searching for hostgroup vars 2016-08-17 16:28:48 -05:00
dir.py skip non executable inventory when no shebang (#15969) 2016-05-24 10:25:10 -04:00
expand_hosts.py Be systematic about parsing and validating hostnames and addresses 2015-09-11 21:47:18 +05:30
group.py Mark implicitly hosts as such and exclude them from the all group 2016-06-04 18:53:47 -05:00
host.py Performance improvements 2016-08-08 15:58:46 -05:00
ini.py draft add group merge priority and yaml inventory 2016-04-07 16:22:36 -04:00
script.py better error when host inventory script isnt dict 2016-01-25 16:32:09 -05:00
yaml.py made format more flexible and allow for non dict entries 2016-05-16 14:39:49 -04:00