Interview Prep/Ansible/Privilege Escalation and Python Interpreter Issues

`failed to resolve remote temporary directory from ansible-tmp-...: 'mkdir -p ... ' failed: Permission denied`

IntermediateTroubleshootingPrivilege Escalation and Python Interpreter Issues
Answer

Likely causes → Home directory not writable or full disk, read-only filesystem, or remote_tmp points to an unwritable location.

Diagnose → df -h ~ /tmp, touch ~/.ansible/tmp/x, check mount flags.

Fix → Fix permissions or free disk. Set remote_tmp = /tmp/.ansible-${USER}/tmp in ansible.cfg when homes are read-only.

Prevent → Alert on disk usage and use remote_tmp for locked-down hosts.

All Ansible questions Roadmap: Ansible

More on Privilege Escalation and Python Interpreter Issues