# filtering using gce\_labels

**URL:** <https://forum.ansible.com/t/filtering-using-gce-labels/25695>\
**Category:** Ansible Project\
**Created:** [October 6, 2017, 3:02pm UTC](https://forum.ansible.com/t/filtering-using-gce-labels/25695 "2017-10-06T15:02:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulatkinson](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@paulatkinson](https://forum.ansible.com/u/paulatkinson)\
**Post date:** [October 6, 2017, 3:02pm UTC](https://forum.ansible.com/t/filtering-using-gce-labels/25695/1 "2017-10-06T15:02:21Z")

</div>

Hi

Does anyone know how to utilise gcloud labels within ansible playbook?  
IE Use Label to Identify Hosts within Google Cloud and then perform relevant actions against those hosts.

We have created gce\_label using gcloud as the gce\_labels function is not working.

Looking for the simplest solution. Previous solution worked with tags but no longer able to use them.

Normally you would just use hosts: XXX  
So how is this done with gce\_labels.

Regards,

Paul
