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
pull/36470/head
Adrian Likins 7 years ago committed by Brian Coca
parent d212ca11b3
commit 810fa7046b

@ -417,15 +417,6 @@ class ConsoleCLI(CLI, cmd.Cmd):
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)
self.groups = self.inventory.list_groups()

Loading…
Cancel
Save