Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-console asks for vault password #33027

Closed
Salvor42 opened this issue Nov 17, 2017 · 4 comments · Fixed by #36244
Closed

ansible-console asks for vault password #33027

Salvor42 opened this issue Nov 17, 2017 · 4 comments · Fixed by #36244
Assignees
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@Salvor42
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible-console

ANSIBLE VERSION
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

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

Debian 9

SUMMARY

ansible-console asks for vault password if run without any options. It never did that before (<= 2.3)

STEPS TO REPRODUCE

Just run ansible-console

ansible-console
EXPECTED RESULTS

I think it shoud not ask for a vault password here.

ACTUAL RESULTS
Vault password:
@ansibot
Copy link
Contributor

ansibot commented Nov 17, 2017

Files identified in the description:

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

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug_report needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 17, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Nov 17, 2017
@ironicbadger
Copy link

ironicbadger commented Dec 15, 2017

at the risk of sounding like a cliche, i have the same issue. I can input any password (except blank) and console continues.

@jstoja
Copy link

jstoja commented Feb 15, 2018

After migrating from stable-23 to stable-24, I get that issue. It appears only with ansible-console though.

@alikins alikins self-assigned this Feb 15, 2018
@alikins
Copy link
Contributor

alikins commented Feb 15, 2018

There apprears to be a redundant call to setup_vault_secrets() in ansible-console, one of which doesn't turn off auto_prompt. Fix appears to be just removing the redundant/incorrect setup_vault_secrets() call.

rahushen pushed a commit to rahushen/ansible that referenced this issue Feb 15, 2018
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 ansible#33027
bcoca pushed a commit that referenced this issue Feb 15, 2018
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

(cherry picked from commit 810fa70)
bcoca pushed a commit that referenced this issue Feb 16, 2018
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

(cherry picked from commit 810fa70)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants