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.
More on Security and Secrets
How do you set up a secure automation user and SSH access?BeginnerHow do you give the automation user sudo with least privilege?IntermediateWhat are the alternatives to Ansible Vault for secrets, and when do you use them?IntermediateHow do you read AWS Secrets Manager and SSM parameters in a playbook?IntermediateHow do you integrate HashiCorp Vault with Ansible?AdvancedHow do you stop secrets from leaking into logs and output?Beginner