I'm wondering when developing an Ansible Collection, is it possible to get arbitrary logs written to a log file/console?
This being a random print()
statement to help debugging, or is the only way just to concatenate your final return message?
Thank you
Question:
Answer:
Your question for me looks similar to Is it possible to print out debugging logs while task is running in Ansible?.
According the answer there citing from documentation
so such live output is not implemented. There is an option for Debugging modules during development
but that might not fit all of your cases.
Question:
Answer:
According the Developer Guide » Debugging modules » Simple debugging