mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 11:40:22 -07:00
Fixup slurp module usage when not running as root, fix error handling path in slurp module.
This commit is contained in:
parent
70734f5968
commit
13ba31231e
2 changed files with 2 additions and 2 deletions
|
@ -471,7 +471,7 @@ class Runner(object):
|
||||||
if self.remote_user == 'root':
|
if self.remote_user == 'root':
|
||||||
metadata = '/etc/ansible/setup'
|
metadata = '/etc/ansible/setup'
|
||||||
else:
|
else:
|
||||||
metadata = '~/.ansible/setup'
|
metadata = "/home/%s/.ansible/setup" % self.remote_user
|
||||||
|
|
||||||
# install the template module
|
# install the template module
|
||||||
slurp_module = self._transfer_module(conn, tmp, 'slurp')
|
slurp_module = self._transfer_module(conn, tmp, 'slurp')
|
||||||
|
|
|
@ -50,7 +50,7 @@ source = params['src']
|
||||||
if not os.path.exists(source):
|
if not os.path.exists(source):
|
||||||
print json.dumps(dict(
|
print json.dumps(dict(
|
||||||
failed = 1,
|
failed = 1,
|
||||||
msg = "file not found: %s" % metadata
|
msg = "file not found: %s" % source
|
||||||
))
|
))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue