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

Addresses #6579 Only strip vault passwords if given

This commit is contained in:
James Tanner 2014-03-19 16:08:35 -04:00
parent 8c2e1e2baa
commit e71857fbdf

View file

@ -811,8 +811,10 @@ def ask_vault_passwords(ask_vault_pass=False, ask_new_vault_pass=False, confirm_
raise errors.AnsibleError("Passwords do not match")
# enforce no newline chars at the end of passwords
vault_pass = vault_pass.strip()
new_vault_pass = new_vault_pass.strip()
if vault_pass:
vault_pass = vault_pass.strip()
if new_vault_pass:
new_vault_pass = new_vault_pass.strip()
return vault_pass, new_vault_pass