A sudo password is required on the targets. How does Ansible get it without prompting each time?
BeginnerScenarioSecurity: Vault, Become and Compliance
Answer
Situation read → Interactive become password.
What I'd do → Use -K (--ask-become-pass) interactively, or supply ansible_become_password from Vault in unattended runs. Better, use passwordless sudo restricted to needed commands for the automation user.
Why → Prompting breaks automation; plain text breaks security; vault or sudoers rules are the compromise.
Interview tip → AWX stores it in a credential.
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