mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Add back support for vault_password_file config var (#27597)
Got removed in arg parsing updates. Now added back in setup_vault_secrets(). The default value for DEFAULT_VAULT_PASSWORD_FILE was also set to '~' for some reason, change to to no default. Add integration tests.
This commit is contained in:
parent
f19ed387a7
commit
75a8be9a5d
3 changed files with 18 additions and 1 deletions
|
@ -210,6 +210,11 @@ class CLI(with_metaclass(ABCMeta, object)):
|
|||
# we need to show different prompts. This is for compat with older Towers that expect a
|
||||
# certain vault password prompt format, so 'promp_ask_vault_pass' vault_id gets the old format.
|
||||
prompt_formats = {}
|
||||
|
||||
vault_password_files = vault_password_files or []
|
||||
if C.DEFAULT_VAULT_PASSWORD_FILE:
|
||||
vault_password_files.append(C.DEFAULT_VAULT_PASSWORD_FILE)
|
||||
|
||||
if create_new_password:
|
||||
prompt_formats['prompt'] = ['New vault password (%(vault_id)s): ',
|
||||
'Confirm vew vault password (%(vault_id)s): ']
|
||||
|
|
|
@ -1089,7 +1089,7 @@ DEFAULT_VAULT_IDENTITY:
|
|||
vars: []
|
||||
yaml: {key: defaults.vault_identity}
|
||||
DEFAULT_VAULT_PASSWORD_FILE:
|
||||
default: ~
|
||||
default:
|
||||
desc: 'TODO: write it'
|
||||
env: [{name: ANSIBLE_VAULT_PASSWORD_FILE}]
|
||||
ini:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue