Interview Prep/Ansible/Privilege Escalation and Python Interpreter Issues

`fatal: [web01]: FAILED! => {"msg": "Missing sudo password"}`

BeginnerTroubleshootingPrivilege Escalation and Python Interpreter Issues
Answer

Likely causes → become: true is set but the user needs a password and none was supplied.

Diagnose → ssh host 'sudo -n true' returns "a password is required".

Fix → Run with -K, set ansible_become_password from Vault, or configure NOPASSWD for the automation user.

Prevent → Provision a sudoers drop-in at bootstrap: ansible ALL=(ALL) NOPASSWD: ALL (or a restricted command list).

All Ansible questions Roadmap: Ansible

More on Privilege Escalation and Python Interpreter Issues