I worked around and tried not to use any facts so I disabled fact gathering in my playbook. I now ran into a strange problem and even for a simplest task such as running a shell command the whole thing would just hung...
< TASK: bash | cp /usr/local/bin/help to /usr/local/bin/help.old >
--------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
<mysever> ESTABLISH CONNECTION FOR USER: user
<mysever> REMOTE_MODULE command cp /bin/bash /bin/bash.old #USE_SHELL
<mysever> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/steven/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'StrictHostKeyChecking=no', '-o', 'IdentityFile="/home/steven/.ssh/key-user"', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=user', '-o', 'ConnectTimeout=10', 'mysever', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592 && echo $HOME/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592'"]
<mysever> PUT /tmp/tmpVCdj27 TO /home/user/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592/command
<mysever> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/steven/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'StrictHostKeyChecking=no', '-o', 'IdentityFile="/home/steven/.ssh/key-user"', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=user', '-o', 'ConnectTimeout=10', 'mysever', u'/bin/sh -c \'su root -c "/bin/sh -c \'"\'"\'echo SUDO-SUCCESS-jqiqepwwyueomscsvvidoflkvqfxpkff; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/user/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592/command; rm -rf /home/user/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592/ >/dev/null 2>&1\'"\'"\'"\'']
On the aws server:
$ date
Fri Oct 10 19:27:02 UTC 2014
$ ps axuw|grep python
root 7691 0.0 0.0 143044 1056 pts/1 Ss+ 16:58 0:00 su root -c /bin/sh -c 'echo SUDO-SUCCESS-jqiqepwwyueomscsvvidoflkvqfxpkff; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/adsymp/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592/command; rm -rf /home/user/.ansible/tmp/ansible-tmp-1412960308.87-49429622058592/ >/dev/null 2>&1'
root 17783 0.0 0.1 331228 13320 ? SN 2012 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
As you can see, I let it to run from 16:58 UTC until 19:27 UTC and it is still there.
I would like to know how to fix this as this is a show stopper for me.
The weird thing is that I could use "-m setup" or "-m shell -a uptime" but not through the playbook's tasks.
By they way, in our Ansible community, do we have a tool to capture the environments (ansible facts might do) to provide information for troubleshooting.
Steven.