ERROR: Error reading config file (/Users/user/.ansible.cfg): Source contains parsing errors: '<string>'

Hi, I got this error

ERROR: Error reading config file (/Users/sahabt/.ansible.cfg): Source contains parsing errors: ‘’

<<

My .ansible.cfg file’s content like this:

[node5]
172.17.0.2

That looks like an inventory syntax vs an ansible config syntax.

Walter

I fixed it.

First of all I created a hosts file in /etc/ansible

then I run this command in main path
ansible-config init --disabled all > .ansible.cfg

next I added to .ansible.cfg file this line:
nventory = /etc/ansible/hosts

finally I could list my hosts.

Thanks.

20 Ekim 2022 Perşembe tarihinde saat 20:39:09 UTC+3 itibarıyla walte...@nist.gov şunları yazdı: