mirror of
https://github.com/janLo/ansible_lookup_plugins
synced 2026-06-19 19:48:01 +00:00
Only use the first line of the pass output
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
This commit is contained in:
@@ -88,7 +88,7 @@ class LookupModule(LookupBase):
|
||||
|
||||
(stdout, stderr) = p.communicate()
|
||||
if p.returncode == 0:
|
||||
ret.append(stdout.decode("utf-8").rstrip())
|
||||
ret.append(stdout.decode("utf-8").splitlines()[0].rstrip())
|
||||
else:
|
||||
err = stderr.decode("utf-8").rstrip()
|
||||
raise AnsibleError("lookup_plugin.pass(%s) returned %d: %s" % (term, p.returncode, err))
|
||||
|
||||
Reference in New Issue
Block a user