1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

added stderr from vault script to error

This commit is contained in:
Brian Coca 2016-03-07 20:51:58 -05:00
parent 75ae62a978
commit e24e619cf1

View file

@ -524,7 +524,7 @@ class CLI(object):
raise AnsibleError("Problem running vault password script %s (%s). If this is not a script, remove the executable bit from the file." % (' '.join(this_path), e)) raise AnsibleError("Problem running vault password script %s (%s). If this is not a script, remove the executable bit from the file." % (' '.join(this_path), e))
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
if p.returncode != 0: if p.returncode != 0:
raise AnsibleError("Vault password script %s returned non-zero (%s)." % (this_path, p.returncode)) raise AnsibleError("Vault password script %s returned non-zero (%s): %s" % (this_path, p.returncode, p.stderr))
vault_pass = stdout.strip('\r\n') vault_pass = stdout.strip('\r\n')
else: else:
try: try: