title: Ansible - GCP Dynamic inventory & tags
body: <p>I'm just getting started with ansible and have successfully been able to configure ansible to get dynamic inventory from GCP.</p>
  
  <p>I am able to successfully run the ping module against all instances:</p>
  
  <pre><code>ansible -i ~/git/ansible/inventory all -m ping
  </code></pre>
  
  <p>I am also able to successfully run the ping module against a single instance based on hostname:</p>
  
  <pre><code>ansible -i ~/git/ansible/inventory instance-2 -m ping
  </code></pre>
  
  <p>I would now like to utilize tags to group instances. For example, I have set of instances that are labeled 'env:dev' 
  <a href="https://www.evernote.com/l/AfcLWLkermxMyIK7GvGpQXjXdIDFVAiT_z0" rel="nofollow noreferrer">https://www.evernote.com/l/AfcLWLkermxMyIK7GvGpQXjXdIDFVAiT_z0</a></p>
  
  <p>I have attempted multiple variations of the command below with no luck</p>
  
  <pre><code>ansible -i ~/git/ansible/inventory tag_env:dev -m ping
  </code></pre>
  
  <p>How can I filter and group my dynamic inventory on GCP?</p>