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

**URL:** <https://forum.ansible.com/t/log-playbook-execution-history-if-ansible-run-any-command-in-the-remote-host/36511>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [April 5, 2022, 4:54pm UTC](https://forum.ansible.com/t/log-playbook-execution-history-if-ansible-run-any-command-in-the-remote-host/36511 "2022-04-05T16:54:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yiwei\_Shih](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@Yiwei\_Shih](https://forum.ansible.com/u/Yiwei_Shih)\
**Post date:** [April 5, 2022, 4:54pm UTC](https://forum.ansible.com/t/log-playbook-execution-history-if-ansible-run-any-command-in-the-remote-host/36511/1 "2022-04-05T16:54:38Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Sarabraj\_Singh](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sarabraj\_Singh](https://forum.ansible.com/u/Sarabraj_Singh)\
**Post date:** [April 14, 2022, 2:25pm UTC](https://forum.ansible.com/t/log-playbook-execution-history-if-ansible-run-any-command-in-the-remote-host/36511/2 "2022-04-14T14:25:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yiwei\_Shih](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@Yiwei\_Shih](https://forum.ansible.com/u/Yiwei_Shih)\
**Post date:** [April 14, 2022, 5:29pm UTC](https://forum.ansible.com/t/log-playbook-execution-history-if-ansible-run-any-command-in-the-remote-host/36511/3 "2022-04-14T17:29:59Z")

</div>

Hello Sarabraj,

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

Thanks,
