mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
implemented 'inventory_file' variable. Closes GH-3789.
This commit is contained in:
parent
ceff3b6ba3
commit
e8272e365d
3 changed files with 13 additions and 0 deletions
|
@ -397,6 +397,12 @@ class Inventory(object):
|
|||
return cwd
|
||||
return dname
|
||||
|
||||
def src(self):
|
||||
""" if inventory came from a file, what's the directory and file name? """
|
||||
if not self.is_file():
|
||||
return None
|
||||
return self.host_list
|
||||
|
||||
def playbook_basedir(self):
|
||||
""" returns the directory of the current playbook """
|
||||
return self._playbook_basedir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue