mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix ansible-console always asking for vault passwords
ansible-console was calling setup_vault_secrets twice. Once directly and once via _play_prereqs() The direct invocation was not setting auto_prompt=False. However, the direct invocation isn't need at all so this removes it so only _play_reqs() is used. That fixes the unrequested vault password prompting. Fixes #33027
This commit is contained in:
parent
d212ca11b3
commit
810fa7046b
1 changed files with 0 additions and 9 deletions
|
@ -417,15 +417,6 @@ class ConsoleCLI(CLI, cmd.Cmd):
|
||||||
|
|
||||||
self.loader, self.inventory, self.variable_manager = self._play_prereqs(self.options)
|
self.loader, self.inventory, self.variable_manager = self._play_prereqs(self.options)
|
||||||
|
|
||||||
default_vault_ids = C.DEFAULT_VAULT_IDENTITY_LIST
|
|
||||||
vault_ids = self.options.vault_ids
|
|
||||||
vault_ids = default_vault_ids + vault_ids
|
|
||||||
vault_secrets = self.setup_vault_secrets(self.loader,
|
|
||||||
vault_ids=vault_ids,
|
|
||||||
vault_password_files=self.options.vault_password_files,
|
|
||||||
ask_vault_pass=self.options.ask_vault_pass)
|
|
||||||
self.loader.set_vault_secrets(vault_secrets)
|
|
||||||
|
|
||||||
hosts = CLI.get_host_list(self.inventory, self.options.subset, self.pattern)
|
hosts = CLI.get_host_list(self.inventory, self.options.subset, self.pattern)
|
||||||
|
|
||||||
self.groups = self.inventory.list_groups()
|
self.groups = self.inventory.list_groups()
|
||||||
|
|
Loading…
Reference in a new issue