Repository: ansible/ansible

Issue:
ansible-console asks for vault password

##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bug Report


##### COMPONENT NAME
<!--- Name of the module/plugin/task/feature -->
ansible-console

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes below -->
```
ansible 2.4.1.0
  config file = /home/user1/.ansible.cfg
  configured module search path = [u'/home/user1/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
```

##### CONFIGURATION
<!---
If using Ansible 2.4 or above, paste the results of "ansible-config dump --only-changed"

Otherwise, mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).

-->

DEFAULT_HOST_LIST(/home/user1/.ansible.cfg) = [u'/home/user1/ansible/inventories/devel/i
DEFAULT_LOG_PATH(/home/user1/.ansible.cfg) = /home/user1/logs/ansible.log
DEFAULT_REMOTE_USER(/home/user1/.ansible.cfg) = root
HOST_KEY_CHECKING(/home/user1/.ansible.cfg) = False

##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say "N/A" for anything that is not platform-specific.
Also mention the specific version of what you are trying to control,
e.g. if this is a network bug the version of firmware on the network device.
-->
Debian 9

##### SUMMARY
<!--- Explain the problem briefly -->

ansible-console asks for vault password if run without any options. It never did that before (<= 2.3)

##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->
Just run ansible-console

<!--- Paste example playbooks or commands between quotes below -->
```yaml
ansible-console
```

<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->

I think it shoud not ask for a vault password here.

##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->
``` 
Vault password:
```



Discussion:
Files identified in the description:
* [lib/ansible/cli/console.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/console.py)

If these files are inaccurate, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
at the risk of sounding like a cliche, i have the same issue. I can input any password (except blank) and console continues.
After migrating from stable-23 to stable-24, I get that issue. It appears only with ansible-console though.

Resolving patch:
diff --git a/lib/ansible/cli/console.py b/lib/ansible/cli/console.py
--- a/lib/ansible/cli/console.py
+++ b/lib/ansible/cli/console.py
@@ -417,15 +417,6 @@ def run(self):
 
         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()


Test patch: