Interview Prep/Ansible/Security and Secrets

Is it acceptable to put `ansible_ssh_pass` or `ansible_become_password` in inventory?

BeginnerProductionSecurity and Secrets
Answer

Not in plain text. If you must use passwords, store them in a vaulted file and reference them (ansible_become_password: "{{ vault_become_password }}") or provide them through AWX credentials. Better still, remove passwords from the design: SSH keys or certificates for login and passwordless sudo for the automation user (with the other controls from this section).

Plain-text passwords in inventory also leak through ansible-inventory --list and AWX inventory exports.

All Ansible questions Roadmap: Ansible

More on Security and Secrets