From db4f6b88788fce28e2b42e1dbbc09b58a79cff04 Mon Sep 17 00:00:00 2001 From: Jens Carl Date: Thu, 16 Jul 2015 19:56:21 +0000 Subject: [PATCH] Fix to handle user directory correctly (e.g. ~/.ansible/tmp). --- contrib/inventory/vmware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/inventory/vmware.py b/contrib/inventory/vmware.py index 1d533a5e15..b708d59994 100755 --- a/contrib/inventory/vmware.py +++ b/contrib/inventory/vmware.py @@ -95,7 +95,7 @@ class VMwareInventory(object): Saves the value to cache with the name given. ''' if self.config.has_option('defaults', 'cache_dir'): - cache_dir = self.config.get('defaults', 'cache_dir') + cache_dir = os.path.expanduser(self.config.get('defaults', 'cache_dir')) if not os.path.exists(cache_dir): os.makedirs(cache_dir) cache_file = os.path.join(cache_dir, name)