Commit d2f93511 by Brian Coca

Merge pull request #11615 from j-carl/fix-vmware-user-dir

vmware.py: Fix to handle user directory correctly (e.g. ~/.ansible/tmp).
parents 94fa741f db4f6b88
...@@ -95,7 +95,7 @@ class VMwareInventory(object): ...@@ -95,7 +95,7 @@ class VMwareInventory(object):
Saves the value to cache with the name given. Saves the value to cache with the name given.
''' '''
if self.config.has_option('defaults', 'cache_dir'): 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): if not os.path.exists(cache_dir):
os.makedirs(cache_dir) os.makedirs(cache_dir)
cache_file = os.path.join(cache_dir, name) cache_file = os.path.join(cache_dir, name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment