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 does not become #16614

Closed
hyperized opened this issue Jul 6, 2016 · 3 comments
Closed

ansible-console does not become #16614

hyperized opened this issue Jul 6, 2016 · 3 comments
Labels
bug This issue/PR relates to a bug.

Comments

@hyperized
Copy link
Contributor

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible 2.1.0.0
CONFIGURATION

We're using ec2.py to gather inventory

OS / ENVIRONMENT

n/a

SUMMARY

ansible-console seems to be unable to become root, even though the sudo password is prompted and specific instructions are given to become and to become user.

STEPS TO REPRODUCE
$ ansible-console
SUDO password:
Welcome to the ansible console.
Type help or ? to list commands.

myuser@all (93)[f:50] cd tag_groug_serrver
myuser@tag_group_server (1)[f:50]$ become yes
myuser@tag_group_server (1)[f:50]$ whoami
[redacted] | SUCCESS | rc=0 >>
myuser

myuser@tag_group_server (1)[f:50]$ become_user root
myuser@tag_group_server (1)[f:50]$ become yes
myuser@tag_group_server (1)[f:50]$ whoami
[redacted] | SUCCESS | rc=0 >>
myuser

myuser@tag_group_server (1)[f:50]$ become yes
myuser@tag_group_server (1)[f:50]$ become_user root
myuser@tag_group_server (1)[f:50]$ whoami
[redacted] | SUCCESS | rc=0 >>
myuser
EXPECTED RESULTS

I expected behavior like:

$ ansible tag_group_server -m shell -a "whoami" --become --ask-become-pass
SUDO password:
[redacted] | SUCCESS | rc=0 >>
root
ACTUAL RESULTS

Not being root when using become and become_user on the ansible-console.
The order in which the commands are given seems not to matter.

bcoca added a commit that referenced this issue Jul 7, 2016
fixes #16614

(cherry picked from commit 906dc99)
@bcoca
Copy link
Member

bcoca commented Jul 7, 2016

Fixed by 11eefdc

f you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

https://groups.google.com/forum/#!forum/ansible-project - for user questions, tips, and tricks
https://groups.google.com/forum/#!forum/ansible-devel - for strategy, future planning, and questions about writing code
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@bcoca bcoca closed this as completed Jul 7, 2016
bcoca added a commit that referenced this issue Jul 7, 2016
@hyperized
Copy link
Contributor Author

Thank you, can you tell me in which release this will likely be fixed?

@bcoca
Copy link
Member

bcoca commented Jul 11, 2016

it will be released in 2.1.1

@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 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants