diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index e4ff5132d8..9f955ce94c 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -576,7 +576,9 @@ class Inventory(object): if dname is None or dname == '' or dname == '.': cwd = os.getcwd() dname = cwd - return os.path.abspath(dname) + if dname: + dname = os.path.abspath(dname) + return dname def src(self): """ if inventory came from a file, what's the directory and file name? """