mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Inventory directory should always be absolute. Fixes #4535.
This commit is contained in:
parent
7201a6ffad
commit
b5c9d5a59b
1 changed files with 2 additions and 2 deletions
|
@ -431,8 +431,8 @@ class Inventory(object):
|
||||||
dname = os.path.dirname(self.host_list)
|
dname = os.path.dirname(self.host_list)
|
||||||
if dname is None or dname == '' or dname == '.':
|
if dname is None or dname == '' or dname == '.':
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
return cwd
|
return os.path.abspath(cwd)
|
||||||
return dname
|
return os.path.abspath(dname)
|
||||||
|
|
||||||
def src(self):
|
def src(self):
|
||||||
""" if inventory came from a file, what's the directory and file name? """
|
""" if inventory came from a file, what's the directory and file name? """
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue