I'd like to print out the command line arguments used to invoke ansible-playbook
. E.g., if I do
ansible-playbook foo.yml -e bar=quux
, I'd like to have access to the above string, so that I can do as a task
- shell: slack_notify.sh "{{ ansible_cli_invocation }}"
where ansible_cli_invocation
is a string with the value "ansible-playbook foo.yml -e bar=quux"
. Is there a way to do this?