mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
resolve inventory path on init
This allows meta refresh_inventory to work with relative paths Added option to unfrackpath to not resolv symlinks fixes #16857
This commit is contained in:
parent
28dc527b2c
commit
8217c1c39c
2 changed files with 10 additions and 6 deletions
|
@ -38,6 +38,7 @@ from ansible.module_utils._text import to_bytes, to_text
|
|||
from ansible.parsing.utils.addresses import parse_address
|
||||
from ansible.plugins import vars_loader
|
||||
from ansible.utils.vars import combine_vars
|
||||
from ansible.utils.path import unfrackpath
|
||||
|
||||
try:
|
||||
from __main__ import display
|
||||
|
@ -58,7 +59,7 @@ class Inventory(object):
|
|||
|
||||
# the host file file, or script path, or list of hosts
|
||||
# if a list, inventory data will NOT be loaded
|
||||
self.host_list = host_list
|
||||
self.host_list = unfrackpath(host_list, follow=False)
|
||||
self._loader = loader
|
||||
self._variable_manager = variable_manager
|
||||
self.localhost = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue