summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Menet <membership@sontags.ch>2015-11-12 16:52:02 +0100
committerDaniel Menet <membership@sontags.ch>2015-11-12 16:52:02 +0100
commit0918416b836625e0640c43fb73e8dc9e520949ca (patch)
tree6a5c6088828529ec6dca1f88d4eabb121020bea9
parent79c311a33f66c5bb22c7b9dc8cbf02b668b8bc37 (diff)
downloadansible-0918416b836625e0640c43fb73e8dc9e520949ca.tar.gz
substitute tilde and env vars before storing C.CACHE_PLUGIN_CONNECTION as instance attribute
-rw-r--r--lib/ansible/plugins/cache/jsonfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/plugins/cache/jsonfile.py b/lib/ansible/plugins/cache/jsonfile.py
index 6a1012aa18..e8162f596e 100644
--- a/lib/ansible/plugins/cache/jsonfile.py
+++ b/lib/ansible/plugins/cache/jsonfile.py
@@ -50,7 +50,7 @@ class CacheModule(BaseCacheModule):
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)
self._cache = {}
- self._cache_dir = C.CACHE_PLUGIN_CONNECTION # expects a dir path
+ self._cache_dir = os.path.expandvars(os.path.expanduser(C.CACHE_PLUGIN_CONNECTION)) # expects a dir path
if not self._cache_dir:
raise AnsibleError("error, fact_caching_connection is not set, cannot use fact cache")