From a9eef029b61825f39d1a5301bb7923f9d1c0a8ce Mon Sep 17 00:00:00 2001 From: Veeti Paananen Date: Mon, 28 Jul 2014 17:34:54 +0300 Subject: [PATCH] Expand variables in configuration files e.g. $HOME. Fixes #6373. --- lib/ansible/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index fb3e2420e95..17a09adb182 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -79,7 +79,7 @@ def shell_expand_path(path): ''' shell_expand_path is needed as os.path.expanduser does not work when path is None, which is the default for ANSIBLE_PRIVATE_KEY_FILE ''' if path: - path = os.path.expanduser(path) + path = os.path.expandvars(os.path.expanduser(path)) return path p = load_config_file()