We are running a python script via ansible. The script takes around 45 mins to complete and the logging is in verbose mode. But the issue is we get to know the result only after 45 minutes or if the script fails.
- name: Run a python script
shell: |
cd /tmp/
python {{script_name}} {{branch}} {{ script_action_arg_test }} >> output.txt
I have tried the above approach, the python process keeps running but does not log anything to output.txt Is there a way to capture the verbose logs of the script in ansible itself?