This one baffles me.
I issue this command:
ansible HOSTABC -a 'cat /etc/motd' -K --sudo -v
sudo password:
and I see the success message PLUS the stdout of that file
HOSTABC | success | rc=0 >>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
You are about to access a Duke University computer network that is intended for
authorized users only. You should have no expectation of privacy in your use of
this network. Use of this network constitutes consent to monitoring, retrieval,
and disclosure of any information stored within the network for any purpose
including criminal prosecution.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
However, when I substitue a different filename I *do not see* the stdout output, even though the command succeeds.
ansible HOSTABC -a 'cat /var/log/boot.log' -K --sudo -v
sudo password:
HOSTABC | success | rc=0 >>
<STDOUT SHOULD BE *HERE*>
Can anyone shine a light on this for me?
Thanks!
Andy