Interview Prep/Ansible/Security and Secrets

How do you get an audit trail of who ran what, and where?

BeginnerProductionSecurity and Secrets
Answer

Run production through AWX/AAP or a CI system: they record who launched each job, with which inventory, credentials, project revision and variables, plus the full output. Stream those events to your SIEM (AAP supports external logging to Splunk, ELK and others).

On the hosts, auditd plus the sudo log record privileged commands made by the automation user. For local runs, set log_path = /var/log/ansible/ansible.log, though a central, tamper-resistant record beats files on someone's laptop.

All Ansible questions Roadmap: Ansible

More on Security and Secrets