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

A playbook sets `ansible_ssh_pass` in plain text for a Cisco device.

IntermediateScenarioSecurity: Vault, Become and Compliance
Answer

Situation read → Hard-coded password.

What I'd do → Move the credential to Vault or an AWX credential and reference it via a variable. Prefer key-based auth for SSH.

ansible_password: "{{ vault_cisco_password }}"

Why → Any value in version control must be encrypted, and logs must not show it (no_log).

Interview tip → AWX credentials inject into jobs without being visible to users.

All Ansible questions Roadmap: Ansible

More on Security: Vault, Become and Compliance