Hello,
Is it possible to access the Ansible command typed on the command line from Ansible itself? It would like to log the Ansible command when a playbook is run.
Hello,
Is it possible to access the Ansible command typed on the command line from Ansible itself? It would like to log the Ansible command when a playbook is run.
You’re talking about logging the Ansible command line?
Not in stock ansible, but you could write a modified version of the logging callback that logs sys.argv also when it starts a playbook.
https://github.com/ansible/ansible/blob/devel/plugins/callbacks/log_plays.py