diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2012-04-19 11:38:44 -0400 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2012-04-19 11:38:44 -0400 |
commit | 13ba31231e38c45001a0b9b8a19964dd8249a647 (patch) | |
tree | 5ef2330e3fe2ac4aab8331c33992ccbea48c361a | |
parent | 70734f5968f54e4031c0b41b4311795e0aa5f063 (diff) | |
download | ansible-13ba31231e38c45001a0b9b8a19964dd8249a647.tar.gz |
Fixup slurp module usage when not running as root, fix error handling path in slurp module.
-rwxr-xr-x | lib/ansible/runner.py | 2 | ||||
-rwxr-xr-x | library/slurp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index 0b6ede1004..323ebe7122 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -471,7 +471,7 @@ class Runner(object): if self.remote_user == 'root': metadata = '/etc/ansible/setup' else: - metadata = '~/.ansible/setup' + metadata = "/home/%s/.ansible/setup" % self.remote_user # install the template module slurp_module = self._transfer_module(conn, tmp, 'slurp') diff --git a/library/slurp b/library/slurp index 8b80e5da4b..ab0c879db3 100755 --- a/library/slurp +++ b/library/slurp @@ -50,7 +50,7 @@ source = params['src'] if not os.path.exists(source): print json.dumps(dict( failed = 1, - msg = "file not found: %s" % metadata + msg = "file not found: %s" % source )) sys.exit(1) |