Interview Prep/Ansible/AWX, AAP and Cloud Integration

Why should secrets never be passed as AWX extra vars?

BeginnerProductionAWX, AAP and Cloud Integration
Answer

Extra vars are stored in the job record and shown in the job details to anyone who can view the job, and they can end up in the activity stream and API responses. A password passed as an extra var is effectively published.

Instead:

  • Store secrets in credentials (built-in or custom types), which are encrypted and injected without being shown.
  • If a survey must collect a secret, use the password field type, which is masked and encrypted.
  • Mark tasks handling the secret with no_log: true so the value does not appear in job output.

Treat job output and extra vars as readable by your whole automation user base, because in practice they are.

All Ansible questions Roadmap: Ansible

More on AWX, AAP and Cloud Integration