WARNING provided hosts list is empty only localhost is available Note that the implicit localhost does not match all

+1 vote

I'm trying to run an ansible playbook and encountered the following warning:

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

What do I do?

Jan 22, 2019 in Ansible by Sitara
22,952 views

2 answers to this question.

+3 votes

Hey @Sitara, 

 I just found it is because the temp path is not right. Go to your config file and change the temp path. I had to change it to the absolute path to make it work.

Hope it helps.

answered Jan 22, 2019 by Naina
There are two temp paths which one do i modify?  There is an local_temp and a remote_temp.  So far i have modified the temp path to only read hosts as the tutorial I'm watching tells me.  Do I have to configure those files with the same path?
Hi @LinuxMenace, changing just the local_temp should be good enough. Try that and let me know if it works.
Hi,

I am getting the same eror message, what do I change on the local_temp path? where should I point it to? the current one is as below:

#local_tmp =~/.ansible/tmp
Hey! @Naina's answer says you need to keep your local_temp path as your absolute path instead of relative path.
0 votes
Hi ,

I also faced same issue , but after having deep observation i found that there is  mistake in my   ansible.cfg file.

[default]
inventory = ./inventory
remote_user = Bakshu

In the above i just used [default] instead of [defaults] , now issue solved .. try once...

Bakshu
answered Sep 5, 2020 by Bakshu

I'm having same issue , i have checked the Ansible.cfg . 

Hi@Dinesh,

If you are getting any error, then paste your inventory file here.
Tried using default instead of defaults but its not working for me

Hi,

Inside your /etc/ansible/ansible.cfg file you need to set your inventory file. And you have to use defaults not default as shown below.

[defaults]
inventory = <path>

Also, check that you have proper network connectivity between your systems. 

Related Questions In Ansible

0 votes
1 answer

How to list down all the hosts in Ansible?

Hi@akhtar, You can use the option --list-hosts. It will ...READ MORE

answered Jul 28, 2020 in Ansible by MD
• 95,460 points
48,503 views
0 votes
1 answer
0 votes
1 answer

How do I make my_dir available for all hosts? - Ansible

Hey @Kiara,  f you want to make my_dir available to ...READ MORE

answered Feb 1, 2019 in Ansible by Anisha
1,149 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,061 views
+2 votes
1 answer
0 votes
1 answer

reboot all web servers in Canada, 15 at a time. is that possible in Ansible?

Of course, that is possible @Neel, just ...READ MORE

answered Mar 6, 2019 in Ansible by Yogesh
675 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP