From b5c9d5a59b32b25ff1d0bc9448a92b0bf0656848 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 30 Oct 2013 20:48:53 -0400 Subject: [PATCH] Inventory directory should always be absolute. Fixes #4535. --- lib/ansible/inventory/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index 5a5bc30ecf8..f202a14192b 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -431,8 +431,8 @@ class Inventory(object): dname = os.path.dirname(self.host_list) if dname is None or dname == '' or dname == '.': cwd = os.getcwd() - return cwd - return dname + return os.path.abspath(cwd) + return os.path.abspath(dname) def src(self): """ if inventory came from a file, what's the directory and file name? """