1
0
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:
2019-01-18 11:54:34 +01:00
parent c271d9650c
commit 59e8468faa
+1 -1
View File
@@ -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))