Log playbook execution history if Ansible run any command in the remote host

Hello everyone,

I’m sorry if this has already been answered/solved, I couldn’t find it.

I would like to log the Ansible-Playbook execution history if the playbook executes any command in the remote host by ansible.builtin.command module or shell module. This is the requirement from the security auditor.

For example:

ansible.builtin.command:
cmd: “/tmp/test.sh”

The above task executes the BASH script in the remote host. Does AWX have a feature that can record this action?

I am very new to Ansible, any help is appreciated!

Thanks,

Hello itnewbie,

I am assuming you are in some sort of enterprise environment, given that a security auditor is interested in your execution logs. Is it possible to setup an external log aggregator like splunk to your awx instance?

Thanks,
Sarabraj

Hello Sarabraj,

Thanks for the reply.
Yes, we have Splunk in production.

Thanks,