issue with ansible

Hey guys i’m just configuring my ansible and actually all is ok but whhen i write to file /hosts , information about my server

testserver ansible_host=refresh
ansible_user=sshacc ansible_private_key_file=/home/sshacc/.ssh/id_rsa

and i’m type ansible testserver -i hosts -m ping
the shell return to me

[WARNING]: * Failed to parse /etc/ansible/hosts with ini plugin:
/etc/ansible/hosts:6: Error parsing host definition 'testserver
ansible_host=refresh ': No escaped character

[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

[WARNING]: No inventory was parsed, only implicit localhost is available

[WARNING]: Could not match supplied host pattern, ignoring: all

[WARNING]: provided hosts list is empty, only localhost is available

[WARNING]: Could not match supplied host pattern, ignoring: testserver

[WARNING]: No hosts matched, nothing to do

P.S this is my local virtual machine , pinging is ok .
what’s the trouble and how to fix that?

Hello,

Looks like there’s a trouble with your file.
Can you post a minimal content that show the problem?