<p>You need to check for below possible issues :</p>
<ol>
<li><code>hosts.ini</code> ensure the format is correct, it should be something like this:</li>
</ol>
<blockquote>
<pre><code>[demo]
192.168.1.100 ansible_ssh_port=22 ansible_ssh_user=root
</code></pre>
</blockquote>
<ol start="2">
<li>You are running from the directory in which <code>hosts.ini</code> is there</li>
<li>You have update the Ansible configuration file (<code>ansible.cfg</code>) to include the full path of <code>hosts.ini</code>, whic is specified using keyword <code>inventory</code> as in this example:</li>
</ol>
<blockquote>
<pre><code>inventory = &lt;full_path&gt;/hosts.ini
</code></pre>
</blockquote>

CC BY-SA 4.0
2024-09-07T12:44:24.947Z
2024-09-07T20:39:31.187Z
2024-09-07T20:39:31.187Z
RahulK
<p>I just started learning ansible, when I try to start ping, this error appears<a href="https://i.sstatic.net/CUHnt2er.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CUHnt2er.png" alt="enter image description here" /></a></p>
<p>provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: demo</p>

<ansible>
provided hosts list is empty, only localhost is available
Аркадий Лоскутов
# provided hosts list is empty, only localhost is available

(Asked by: username_0 on 2024-09-07)

I just started learning ansible, when I try to start ping, this error appears[![enter image description here](https://i.sstatic.net/CUHnt2er.png)](https://i.sstatic.net/CUHnt2er.png)

provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: demo

**Tags:** ansible


---

## 1 answers

### Answer by username_1 on 2024-09-07. Score: 0

You need to check for below possible issues :

hosts.ini ensure the format is correct, it should be something like this:


[demo]
192.168.1.100 ansible_ssh_port=22 ansible_ssh_user=root



You are running from the directory in which hosts.ini is there
You have update the Ansible configuration file (ansible.cfg) to include the full path of hosts.ini, whic is specified using keyword inventory as in this example:


inventory = /hosts.ini


---

