{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/11004","labels_url":"https://api.github.com/repos/ansible/ansible/issues/11004/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/11004/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/11004/events","html_url":"https://github.com/ansible/ansible/pull/11004","id":76109241,"number":11004,"title":"Permit logging of all commands executed/shelled","user":{"login":"feld","id":1686547,"avatar_url":"https://avatars.githubusercontent.com/u/1686547?v=3","gravatar_id":"","url":"https://api.github.com/users/feld","html_url":"https://github.com/feld","followers_url":"https://api.github.com/users/feld/followers","following_url":"https://api.github.com/users/feld/following{/other_user}","gists_url":"https://api.github.com/users/feld/gists{/gist_id}","starred_url":"https://api.github.com/users/feld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feld/subscriptions","organizations_url":"https://api.github.com/users/feld/orgs","repos_url":"https://api.github.com/users/feld/repos","events_url":"https://api.github.com/users/feld/events{/privacy}","received_events_url":"https://api.github.com/users/feld/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/feature_pull_request","name":"feature_pull_request","color":"009800"},{"url":"https://api.github.com/repos/ansible/ansible/labels/P4","name":"P4","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-13T20:15:56Z","updated_at":"2015-10-17T04:51:16Z","closed_at":"2015-10-17T04:51:16Z","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/11004","html_url":"https://github.com/ansible/ansible/pull/11004","diff_url":"https://github.com/ansible/ansible/pull/11004.diff","patch_url":"https://github.com/ansible/ansible/pull/11004.patch"},"body":"This may be the wrong way to go about this, but I have not been able to find a solution with callbacks as they just don't seem to have the information. I am looking for a way to log *all* commands shelled out by Ansible. Here's an example of these logs from a simple Ansible playbook that does Gather Facts and installs Apache.\r\n\r\n```\r\nMay 13 15:00:03 testserver ansible-setup: Invoked with filter=* fact_path=/etc/ansible/facts.d \r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip -4 route get 8.8.8.8\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip -6 route get 2404:6800:400a:800::1012\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show primary lo\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show secondary lo\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show primary eth1\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show secondary eth1\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show primary eth0\r\nMay 13 15:00:03 testserver ansible-setup: /sbin/ip addr show secondary eth0\r\nMay 13 15:00:04 testserver ansible-yum: Invoked with name=httpd list=None install_repoquery=True conf_file=None disable_gpg_check=False state=latest disablerepo=None enablerepo=None \r\nMay 13 15:00:04 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q '--disablerepo=*' --pkgnarrow=installed --qf '%{name}-%{version}-%{release}.%{arch}' httpd\r\nMay 13 15:00:05 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q '--disablerepo=*' --pkgnarrow=installed --qf '%{name}-%{version}-%{release}.%{arch}' --whatprovides httpd\r\nMay 13 15:00:05 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' --whatprovides httpd\r\nMay 13 15:00:31 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' httpd\r\nMay 13 15:00:32 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' httpd-2.2.15-9.0.1.el6_1.2.x86_64\r\nMay 13 15:00:32 testserver ansible-yum: /usr/bin/yum -d 2 -y install httpd\r\nMay 13 15:00:41 testserver ansible-yum: Invoked with name=mod_ssl list=None install_repoquery=True conf_file=None disable_gpg_check=False state=latest disablerepo=None enablerepo=None \r\nMay 13 15:00:41 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q '--disablerepo=*' --pkgnarrow=installed --qf '%{name}-%{version}-%{release}.%{arch}' mod_ssl\r\nMay 13 15:00:41 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q '--disablerepo=*' --pkgnarrow=installed --qf '%{name}-%{version}-%{release}.%{arch}' --whatprovides mod_ssl\r\nMay 13 15:00:41 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' --whatprovides mod_ssl\r\nMay 13 15:00:41 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' mod_ssl\r\nMay 13 15:00:42 testserver ansible-yum: /usr/bin/repoquery --show-duplicates --plugins --quiet -q --qf '%{name}-%{version}-%{release}.%{arch}' mod_ssl-2.2.15-39.0.1.el6.x86_64\r\nMay 13 15:00:42 testserver ansible-yum: /usr/bin/yum -d 2 -y install mod_ssl\r\nMay 13 15:00:46 testserver ansible-file: Invoked with directory_mode=None force=False remote_src=None path=/var/log/httpd owner=root follow=False group=root state=directory content=NOT_LOGGING_PARAMETER serole=None diff_peek=None setype=None selevel=None original_basename=None regexp=None validate=None src=None seuser=None recurse=False delimiter=None mode=0750 backup=None \r\nMay 13 15:00:47 testserver ansible-service: Invoked with name=httpd pattern=None enabled=True state=started sleep=None arguments= runlevel=default \r\nMay 13 15:00:47 testserver ansible-service: /sbin/chkconfig --list httpd\r\nMay 13 15:00:47 testserver ansible-service: /sbin/chkconfig httpd on\r\nMay 13 15:00:47 testserver ansible-service: /sbin/initctl status httpd\r\nMay 13 15:00:48 testserver ansible-service: Invoked with name=httpd pattern=None enabled=None state=restarted sleep=None arguments= runlevel=default \r\nMay 13 15:00:48 testserver ansible-service: /sbin/initctl status httpd\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/148885861","html_url":"https://github.com/ansible/ansible/pull/11004#issuecomment-148885861","issue_url":"https://api.github.com/repos/ansible/ansible/issues/11004","id":148885861,"user":{"login":"bcoca","id":836171,"avatar_url":"https://avatars.githubusercontent.com/u/836171?v=3","gravatar_id":"","url":"https://api.github.com/users/bcoca","html_url":"https://github.com/bcoca","followers_url":"https://api.github.com/users/bcoca/followers","following_url":"https://api.github.com/users/bcoca/following{/other_user}","gists_url":"https://api.github.com/users/bcoca/gists{/gist_id}","starred_url":"https://api.github.com/users/bcoca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcoca/subscriptions","organizations_url":"https://api.github.com/users/bcoca/orgs","repos_url":"https://api.github.com/users/bcoca/repos","events_url":"https://api.github.com/users/bcoca/events{/privacy}","received_events_url":"https://api.github.com/users/bcoca/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T04:51:16Z","updated_at":"2015-10-17T04:51:16Z","body":"fixed via ddafed4403756577ff4274e75cc753b853d5a5e3, this is now tied to the ansible having debug=true"}}