ping is not working

When I test ping command with ansible, I am getting the below error, (red colored)

/etc/ansible$ more hosts
root@192.168.100.128

/etc/ansible$ more ansible.cfg
[defaults]
remote_tmp = /tmp/ansible-$USER
#remote_tmp = $HOME/.ansible/tmp
local_tmp = $HOME/.ansible/tmp

This is not correct inventory syntax
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html

look at the ansible_user in the link

The error suggests your target has a very old version of python `with`
was introduced in Python 2.6 (iirc), which is the minimum supported by
current versions of Ansible.
Support for older versions of Python was dropped in Ansible 2.4.

You probably need to upgrade the python on the target and/or point to
a newer version via ansible_python_inteprteter

@kai, user@host is valid inventory syntax, it is not something we
recommend but it does work.

Yes, it is correct. the python version on the target is 2.4.

Thanks for your valuable answer.

Make sure your are typing the password as the authentication mechanism may be keyboard interactive for the ssh user by passing -k option when running the command