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

You want to see the value inside an encrypted file without writing a decrypted copy to disk.

BeginnerScenarioSecurity: Vault, Become and Compliance
Answer

Situation read → Inspecting a secret safely.

What I'd do →

ansible-vault view group_vars/prod/vault.yml
ansible-vault edit group_vars/prod/vault.yml

Why → view shows it in the pager, and edit uses a temp file then re-encrypts.

Interview tip → Set EDITOR and be careful with shell history for encrypt_string.

All Ansible questions Roadmap: Ansible

More on Security: Vault, Become and Compliance