In the following example echo_out.stdout is properly populated with “hello” but cat_testfile.stdout and tail_testfile are both empty. My real use case is to do a pass/fail test on an external command that dumps it’s output to a file.
- command: echo hello
register: echo_out
- command: cat /tmp/testfile
register: cat_testfile
- command: tail /tmp/testfile
register: cat_testfile