title: [WARNING]: provided hosts list is empty, only localhost is available when inventory exists
body: <p>I'm trying to get a list of facts available about my azure VM by running</p>
  
  <pre><code>ansible -m setup hostname
  </code></pre>
  
  <p>as described in the <a href="http://docs.ansible.com/ansible/faq.html#how-do-i-see-a-list-of-all-of-the-ansible-variables" rel="nofollow">FAQ</a></p>
  
  <p>So I have</p>
  
  <pre><code>ansible -m setup my-vm1
  </code></pre>
  
  <p>which I run from the machine in the azure cloud that I normally run my ansible commnads from (the machine I normally successfully use to talk to and modify the host in question) This results in:</p>
  
  <pre><code> [WARNING]: provided hosts list is empty, only localhost is available
  </code></pre>
  
  <p>However I have an ansible inventory in /etc/ansible/hosts:</p>
  
  <pre><code>40.127.174.129
  my-vm1.westeurope.cloudapp.azure.com ansible_sudo_pass=MyPassword
  my-vm2.westeurope.cloudapp.azure.com
  my-vm3.westeurope.cloudapp.azure.com
  </code></pre>
  
  <p>When I run the same command using the FQDN I get the following:</p>
  
  <pre><code>[me@ansible-machine]$ ansible -m setup my-vm1.westeurope.cloudapp.azure.com
  
  my-vm1.westeurope.cloudapp.azure.com | UNREACHABLE! =&gt; {
  "changed": false,
  "msg": "Failed to connect to the host via ssh.",
  "unreachable": true
  </code></pre>
  
  <p>What am I doing wrong?</p>