Only use the first line of the pass output
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
This commit is contained in:
parent
c271d9650c
commit
59e8468faa
2
pass.py
2
pass.py
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue