How to see stdout of ansible commands?

I think you can register the result to a variable, then print with debug.

- name: print to stdout
  command: echo "hello"
  register: hello

- debug: msg="{{ hello.stdout }}"

- debug: msg="{{ hello.stderr }}"

Leave a Comment