title: How to list groups that host is member of?
body: <p>I have a very complex Ansible setup with thousands of servers and hundreds of groups various servers are member of (dynamic inventory file).</p>
  
  <p>Is there any way to easily display all groups that a specific host is member of?</p>
  
  <p>I know how to list all groups and their members:</p>
  
  <pre><code>ansible localhost -m debug -a 'var=groups'
  </code></pre>
  
  <p>But I want to do this not for ALL hosts, but only for a single one.</p>