<p dir="auto">As requested <a href="https://groups.google.com/forum/#!topic/ansible-project/fDMQhGuSt9A" rel="nofollow">here</a> I'm filing a bug report for the following test case:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat hosts

---
- group: all
  hosts:
  - host: 10.120.137.188:23000
  - host: 10.120.137.188:23001
$ ansible all -i ./hosts -m shell -a uptime
10.120.137.188:23000 | FAILED =&gt; FAILED: [Errno -2] Name or service not known
10.120.137.188:23001 | FAILED =&gt; FAILED: [Errno -2] Name or service not known"><pre class="notranslate"><code class="notranslate">$ cat hosts

---
- group: all
  hosts:
  - host: 10.120.137.188:23000
  - host: 10.120.137.188:23001
$ ansible all -i ./hosts -m shell -a uptime
10.120.137.188:23000 | FAILED =&gt; FAILED: [Errno -2] Name or service not known
10.120.137.188:23001 | FAILED =&gt; FAILED: [Errno -2] Name or service not known
</code></pre></div>
<p dir="auto">Ansible: devel, r404c3acbbf5ed3f2f6a5a2f64cc230cd22317e15<br>
OS: Ubuntu 12.04<br>
Python: 2.7.3</p>
<p dir="auto">When a host is listed both "globally" and within a group, e.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="10.0.3.232 foo=bar

[example]
10.0.3.232

[example:vars]
domain=example.com"><pre class="notranslate"><code class="notranslate">10.0.3.232 foo=bar

[example]
10.0.3.232

[example:vars]
domain=example.com
</code></pre></div>
<p dir="auto">The 'setup' command lists it only as belonging to "ungrouped" and ignores any group vars:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        &quot;foo&quot;: &quot;bar&quot;, 
        &quot;group_names&quot;: &quot;[ungrouped]&quot;, 
        &quot;inventory_hostname&quot;: &quot;10.0.3.232&quot;, "><pre class="notranslate"><code class="notranslate">        "foo": "bar", 
        "group_names": "[ungrouped]", 
        "inventory_hostname": "10.0.3.232", 
</code></pre></div>