summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/ansible/runner.py3
-rwxr-xr-xlibrary/slurp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py
index 323ebe7122..2a49b9bbfc 100755
--- a/lib/ansible/runner.py
+++ b/lib/ansible/runner.py
@@ -471,7 +471,8 @@ class Runner(object):
if self.remote_user == 'root':
metadata = '/etc/ansible/setup'
else:
- metadata = "/home/%s/.ansible/setup" % self.remote_user
+ # path is expanded on remote side
+ metadata = "~/.ansible/setup"
# install the template module
slurp_module = self._transfer_module(conn, tmp, 'slurp')
diff --git a/library/slurp b/library/slurp
index ab0c879db3..36e84ecc09 100755
--- a/library/slurp
+++ b/library/slurp
@@ -42,7 +42,7 @@ params = {}
for x in items:
(k, v) = x.split("=")
params[k] = v
-source = params['src']
+source = os.path.expanduser(params['src'])
# ==========================================