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 
[email protected] şunları yazdı:

> That looks like an inventory syntax vs an ansible config syntax.
>
> Walter
> --
> Walter Rowe, Division Chief
> Infrastructure Services, OISM
> Mobile: 202.355.4123 <(202)%20355-4123>
>
> On Oct 20, 2022, at 1:33 PM, Çağlayan Sancaktar <[email protected]> 
> wrote:
>
> Hi, I got this error  
> >>
> ERROR: Error reading config file (/Users/sahabt/.ansible.cfg): Source 
> contains parsing errors: '<string>'
> <<
>
> My .ansible.cfg file's content like this:
> >>
> [node5]
> 172.17.0.2
> ~
> ~
> <<
>
> Can you help me ? What am i doing wrong?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/efa7a928-a110-4d6b-b914-bc3eabca43a4n%40googlegroups.com
>  
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fefa7a928-a110-4d6b-b914-bc3eabca43a4n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cb5694c870b564d0f88ce08dab2c134d0%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638018840127846580%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q0ZwYDkvVnu7mpFtxjGB8apwRAJ2N8Bw61eidrKm5Lk%3D&reserved=0>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5e6bb7f5-bedd-423e-96aa-a02832ae5493n%40googlegroups.com.

Reply via email to