Interview Prep/Ansible/Privilege Escalation and Python Interpreter Issues

`become_method` `su` fails: `Timeout (12s) waiting for privilege escalation prompt`

IntermediateTroubleshootingPrivilege Escalation and Python Interpreter Issues
Answer

Likely causes → su prompt localised or different, wrong root password, or PAM restrictions.

Diagnose → ansible web01 -b --become-method su -K -m ping -vvv.

Fix → Provide the correct ansible_become_password, set LANG=C through ansible_shell_executable/environment, or switch to sudo.

Prevent → Standardise on sudo.

All Ansible questions Roadmap: Ansible

More on Privilege Escalation and Python Interpreter Issues