-
Notifications
You must be signed in to change notification settings - Fork 199
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 become / sudo broken since commit f1503874de82353cbed8b51408d20fdfa899f8f7 #952
Comments
Other than "the sudo feature was broken" you seem not to include any details of what you are experiencing. Could you include a reproducer? |
As it is IMHO quite easy to reproduce, I just omitted some debug output ... playbook: ---
- hosts: testhost
gather_facts: no
become: yes
tasks:
- command: id -u
register: uid
- debug:
var: uid.stdout with mitogen as git checkout @ commit 8cda5f5
full output
with the commit f150387 reverted all works as expected
verbose output:
|
I can reproduce it now, but it wasn't obvious at all. And I think it still lacks some details.
This is a different host in the output; did you configure some connection delegation or something? And what are the configurations for:
Anyway, to me it seems to have broken that specific case of Possible duplicate: #944 |
I use the -K option, as the host has ssh key auth but requires a sudo password The problem occurred on all hosts that require sudo |
…precendence Until Ansible 2.9 it looks like ansible_become_password had higher priority. From Ansible 2.10 ansible_become_pass has higher priority [1]. Mitogen was not respecting this. I may need to rework this further, instatiating the become plugin may have slowed down execution. [1] Based on testing with ``` [ubuntus] become-pass-pass ansible_become_pass=1234 become-pass-password ansible_become_password=1234 become-pass-both ansible_become_password=wrong ansible_become_pass=1234 [ubuntus:vars] ansible_host=ubuntu2004.local ansible_user=ubuntu ``` ``` - hosts: ubuntus gather_facts: false become: true tasks: - ping: ```
To be clear; does a I could reproduce it only for |
yes, using
I have the same behavior ... |
I'm running into the same issue - current mitogen master and ansible 2.13.3. |
Reverting the problematic commit has resolved things for me. |
Is become_method supported or not ? I think I find conflicting informations? I tried it now for the first time, but version 0.3.2 for mitogen does not work:
|
@HOSTED-POWER Your problem seems unrelated, please read the error message - you seem to not have
|
I do have sudo: /usr/bin/sudo And all works fine without mitogen ... I did indeed use become with sudo. I commented the lines and just kept the become, but still get the same error. |
@HOSTED-POWER I still feel like your issue is different. This issue report was about the password not being passed to sudo, with
while your error indicates I'd suggest to post a full minimal reproducer with playbook+config in a new issue, including details like target OS version etc. |
Confirming I can reproduce this
all:
hosts:
testhost:
ansible_host: 192.168.1.104 - hosts: testhost
gather_facts: no
become: yes
tasks:
- command: id -u
register: uid
- debug:
var: uid.stdout |
Previously f150387 fixed the priority of ansible_become_pass over ansible_become_password, but broke --ask-become-pass. Fixes mitogen-hq#952.
Previously f150387 fixed the priority of ansible_become_pass over ansible_become_password, but broke --ask-become-pass. Fixes mitogen-hq#952.
Previously f150387 fixed the priority of ansible_become_pass over ansible_become_password, but broke --ask-become-pass. Fixes mitogen-hq#952.
Previously f150387 fixed the priority of ansible_become_pass over ansible_become_password, but broke --ask-become-pass. Fixes mitogen-hq#952.
Previously f150387 fixed the priority of ansible_become_pass over ansible_become_password, but broke --ask-become-pass. Fixes mitogen-hq#952.
Please drag-drop large logs as text file attachments.
Feel free to write an issue in your preferred format, however if in doubt, use
the following checklist as a guide for what to include.
Which version of Ansible are you running?
2.12.2 + 2.13.2
Is your version of Ansible patched in any way? NO
Are you running with any custom modules, or
module_utils
loaded? NOHave you tried the latest master version from Git? YES
Mention your host and target OS and versions
Debian GNU/Linux 11 (bullseye)
Mention your host and target Python versions
python version = 3.9.2
If reporting any kind of problem with Ansible, please include the Ansible
version along with output of "ansible-config dump --only-changed".
While testing a upgrade to ansibel 2.13.2, IO tried the latest checkout from github and realized the sudo feature was broken.
Rolling back to ansible 2.12, but preserving the latest mitogen checkout, I realized that this problem seems to be not related to the ansible version in use, but caused by mitogen.
Using
git bisect
the faulty commit I identified is:The text was updated successfully, but these errors were encountered: