Interview Prep/Ansible/Security: Vault, Become and Compliance

You discover that `become` tasks leave module temp files in the user's home. How do you reduce that exposure?

AdvancedScenarioSecurity: Vault, Become and Compliance
Answer

Situation read → Temporary files and permissions.

What I'd do → Enable pipelining to avoid writing modules, set remote_tmp to a protected location, and make sure ansible_remote_tmp is not world-readable.

[defaults]
remote_tmp = /tmp/.ansible-${USER}/tmp
[ssh_connection]
pipelining = True

Why → Pipelining streams the module over stdin and leaves nothing on disk (except for async).

Interview tip → Pipelining plus sudo requires !requiretty.

All Ansible questions Roadmap: Ansible

More on Security: Vault, Become and Compliance