I am executing python script through ansible. I have some prints in python but none seem to display in the Ansible output. I see following in the output of the Ansible.
{"changed": true, "rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}
I have tried the following to display the prints in ansible.
tasks:
- name: Run script on remote host
script: python_script.py
register: output
- debug: var=output.stdout_lines
But see that none of the prints are being displayed.
ok: [remoteHostName] => {
"output.stdout_lines": []
I am new to Ansible. Any references or guidance would help me print the log from python script.