Bug 1445712 - become_method=su fails waiting for privilege escalation prompt
Summary: become_method=su fails waiting for privilege escalation prompt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1461922
TreeView+ depends on / blocked
 
Reported: 2017-04-26 11:06 UTC by Juan Orti Alcaine
Modified: 2017-06-17 21:20 UTC (History)
6 users (show)

Fixed In Version: ansible-2.3.1.0-1.el6 ansible-2.3.1.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1461922 (view as bug list)
Environment:
Last Closed: 2017-06-17 21:18:35 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github ansible ansible issues 23689 None None None 2017-04-26 11:13:26 UTC

Description Juan Orti Alcaine 2017-04-26 11:06:34 UTC
Description of problem:
It's impossible to connect to hosts with become_method=su

It always fails with a timeout error:

TASK [Gathering Facts] ***************************************************************************************************************************************
fatal: [192.168.150.77]: FAILED! => {"failed": true, "msg": "Timeout (12s) waiting for privilege escalation prompt: "}


Version-Release number of selected component (if applicable):
ansible-2.3.0.0-3.fc25.noarch

Additional info:
I think it is upstream bug 23710: https://github.com/ansible/ansible/pull/23710

Comment 1 Juan Orti Alcaine 2017-04-26 11:13:27 UTC
Ansible issue 23689

Comment 2 Fedora Update System 2017-06-01 23:06:50 UTC
ansible-2.3.1.0-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-5279a157d2

Comment 3 Fedora Update System 2017-06-01 23:07:09 UTC
ansible-2.3.1.0-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b316d2bb3b

Comment 4 Fedora Update System 2017-06-03 02:50:31 UTC
ansible-2.3.1.0-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-5279a157d2

Comment 5 Fedora Update System 2017-06-03 02:56:25 UTC
ansible-2.3.1.0-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-b316d2bb3b

Comment 6 Juan Orti Alcaine 2017-06-11 19:17:36 UTC
This is an example playbook which timeouts for all the remote hosts with ansible-2.3.1.0-1.fc26.noarch.

It works for localhost, which has defined ansible_connection: local

- name: become_method=su test
  hosts: all
  become: yes
  become_method: su
  remote_user: juan
  tasks:
      - ping:


$ ansible-playbook playbooks/su-test.yml                                                                                                                                                            

PLAY [become_method=su test] **************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************
ok: [localhost]
fatal: [remotehost1]: FAILED! => {"failed": true, "msg": "Timeout (12s) waiting for privilege escalation prompt: "}
fatal: [remotehost2]: FAILED! => {"failed": true, "msg": "Timeout (12s) waiting for privilege escalation prompt: "}

TASK [ping] *******************************************************************************************************************************************************************************************************
ok: [localhost]

PLAY RECAP ********************************************************************************************************************************************************************************************************
remotehost1                      : ok=0    changed=0    unreachable=0    failed=1   
remotehost2                      : ok=0    changed=0    unreachable=0    failed=1   
localhost                      : ok=2    changed=0    unreachable=0    failed=0

Comment 7 Juan Orti Alcaine 2017-06-11 20:29:29 UTC
Sorry, after introducing the become password with -K, this test playbook works in Fedora and epel7.

Tomorrow I'll check some complex playbooks we have at work which were failing these days.

Comment 8 Juan Orti Alcaine 2017-06-12 10:29:20 UTC
After a more detailed review, I can confirm this issue is fixed in Fedora.

Thank you.

Comment 9 Fedora Update System 2017-06-17 21:18:35 UTC
ansible-2.3.1.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-06-17 21:20:53 UTC
ansible-2.3.1.0-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.