Fail if the vault password script returns non-zero.
This commit is contained in:
parent
dac3684fd1
commit
fa332e1342
1 changed files with 2 additions and 0 deletions
|
@ -501,6 +501,8 @@ class CLI(object):
|
||||||
except OSError as e:
|
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))
|
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:
|
||||||
|
raise AnsibleError("Vault password script %s returned non-zero (%s)." % (this_path, p.returncode))
|
||||||
vault_pass = stdout.strip('\r\n')
|
vault_pass = stdout.strip('\r\n')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue