mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Fix --ask-vault-pass prompt to match old when poss (#27602)
If we don't use more than one vault-id, and we use --ask-vault-pass, instead of using the new vault prompt format ('Vault password (my_vault_id): ') we use the old one ('Vault password: '). This avoids confusing Tower when it needs to detect an interactive vault password prompt. This also potentially could allow vault password prompts to be customized per vault_id.
This commit is contained in:
parent
37392318a6
commit
9f57920eab
2 changed files with 20 additions and 10 deletions
|
@ -259,7 +259,7 @@ class PromptVaultSecret(VaultSecret):
|
|||
b_vault_passwords = []
|
||||
|
||||
for prompt_format in self.prompt_formats:
|
||||
prompt = prompt_format % self.vault_id
|
||||
prompt = prompt_format % {'vault_id': self.vault_id}
|
||||
try:
|
||||
vault_pass = display.prompt(prompt, private=True)
|
||||
except EOFError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue