Hey guys,
How to access the playbook execution log file at run time? I would need to email it after running the playbook.
For example, a simple playbook:
---
- hosts: localhost
tasks:
- name: "display message"
debug:
msg: "Hello"
I would need to email the execution output:
PLAY [localhost] *********************************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************************
ok: [localhost]
TASK [display message] ***************************************************************************************************************************************
ok: [localhost] => {
"msg": "Hello"
}
PLAY RECAP ***************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
PS.:
I cannot set the ANSIBLE_LOG_PATH environment variable before executing the playbook because the execution will be done through AWX and not through the command line.