Configuration Management Tool

WARNING: The provided hosts list is empty only the localhost is available and note that the implicit localhost does not match all

empty hosts list

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.

localhost

Solution: Access the following path in order to modify the ansible.cfg file as shown below C:\cygwin64\etc\ansible

implicit localhost

Empty Hosts List Warning

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 🙂 )

warning message

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 .

I hope you found this blog post on Empty Hosts List Warning helpful. Please let me know in the comment session if you have any questions.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x