This error is because the section named “inventory” in the ansible.cfg file is commented out. The steps below are ways to resolve the issue.
Solution: Access the following path in order to modify the ansible.cfg file as shown below C:\cygwin64\etc\ansible
Next, open the file with any of your favourite text editor. I will be using notepad++
– Uncomment the “inventory” out and
– Save the file (Do not forget to save 🙂 )
You can also use VIM as shown below. When you are done, ensure you save and quit with the following command as shown in the screenshot below.
Note: The host is present in the host file as well. For how to setup Ansible on Windows, see the following link https://techdirectarchive.com/2020/03/01/ansible-installation-on-windows/
I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.