why isn't stdout returned on this most basic of commands?

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 >>

What version of ansible are you running? There were some issues in parsing the stdout of some commands when unicode characters were contained in it, however that has been fixed in devel for a couple of weeks.

I know why! I know why!

You are a Duke alumni attempting to access a UNC computer network.

As a Wolfpacker, I endorse any civil war that may ensue and result in the demise of both athletic franchises.

That all being said, that’s not normal, let us know your version info. Depending on results we may have another command or two for you to run.

I need to swap UNC and Duke in that above joke. Rraaargh, so much for trying to be funny on the internets :slight_smile:

Michael / James –

Thanks for the quick reply. I’m using ansible 1.5.3-1.el6

BTW, Michael, I also have connections to NCSU. I’m the only person I know that has worked full-time for at least a year at all three of: UNC, Duke, and State. I did enjoy your jab, though.

Best wishes,
Andy

You need to get some Wake Forrest in there.

I think we'd be interested in the file contents (in case this matters) and
if you can make a playbook to reproduce things we could test.

Michael –

(Note that as of this morning, I am at version 1.5.5-1.el6 of ansible, and still seeing the same issue – FYI)

The simplest of playbooks to show the error:

Appreciate the follow up, please make sure this is filed on github and we can take a look.

github.com/ansible/ansible.

Thanks!

Michael –

Just created at github ==> https://github.com/ansible/ansible/issues/7299

Andy

Just to close the loop…ansible 1.6.2 DOES fix this issue for me.

Thanks!

Andy

Unfortunately, this problem has returned (as of version 1.8.4 ?):

FAILS:

ansible HOSTXYZ -m shell -a ‘cat /var/log/boot.log’ -K --sudo
sudo password:
HOSTXYZ | success | rc=0 >>

<NO OUTPUT HERE, WHERE THERE SHOULD BE (DUE TO SPECIAL CHARACTERS AT THE BEGINNING OF THAT FILE?)>

WORKS PROPERLY:

ansible HOSTXYZ -m shell -a ‘cat /etc/motd’ -K --sudo
sudo password:
HOSTXYZ | success | rc=0 >>