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

Merge pull request #12674 from sudarkoff/fail_if_executable_password_file_returns_nonzero

(TRIVIAL) Fail if the vault password script returns non-zero.
This commit is contained in:
Brian Coca 2016-03-07 20:45:26 -05:00
commit 75ae62a978

View file

@ -523,6 +523,8 @@ class CLI(object):
except OSError as 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()
if p.returncode != 0:
raise AnsibleError("Vault password script %s returned non-zero (%s)." % (this_path, p.returncode))
vault_pass = stdout.strip('\r\n')
else:
try: