Ansible trouble shooting

1, get error below in client "/var/log/auth.log" file after ansible host ran the ping command return fault:

sshd[29378]: Connection closed by [preauth] | UNREACHABLE! => {
    "changed": false,
    "msg": "Failed to connect to the host via ssh: Connection to timed out while waiting to read\r\n",
    "unreachable": true


iptables INPUT policy was DROP, although the ansible host was accept, but the state wasn't be setted, so I should add this policy

"iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT"

solved 2 from bubie liu:

Should use the right user to execute ansible host command