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.
More on Security: Vault, Become and Compliance
Database passwords are sitting in plain text in `group_vars`. How do you fix it?BeginnerYou need separate vault passwords for staging and prod.IntermediateHow do you change the vault password for all encrypted files?IntermediateA CI pipeline needs the vault password without storing it in the repo.IntermediateYou want to see the value inside an encrypted file without writing a decrypted copy to disk.BeginnerOnly one value in a vars file is secret and you want it in the same file as plain values.Beginner