Long story short: I was building out a system wherein the hadoop user’s .bashrc file was writing to stdout. This interfered with the functioning of the ansible and ansible-playbook commands. For instance:
» ansible -u hadoop --private-key=/home/drc/.ssh/obsidianaws.pem -i /home/drc/.ansible/hosts -m ping box1
box1 | FAILED => failed to open a SFTP connection
» ansible -u hadoop -c ssh --private-key=/home/drc/.ssh/obsidianaws.pem -i /home/drc/.ansible/hosts -m ping box1
box1 | FAILED => failed to transfer file to /home/hadoop/.ansible/tmp/ansible-1362080597.37-11062316293652/ping:
Received message too long 173490514
The hadoop account had no obvious ssh or authentication issues. It could shell into the box, issue commands, etc.
Removing hadoop’s bashrc file cleared up the problem. As a further test I created a single line .bashrc that just echoed text:
echo “hello from .bashrc”
This sufficed to reproduce the problem illustrated above.