plugin: gcp_compute zones: # populate inventory with instances in these regions - us-central1-a projects: - centos-k8s filters: # - scheduling.automaticRestart = true AND machineType = n1-standard-1 service_account_file: /home/jonny/terraform/gcp-k8s/centos-k8s-d9557c7f6db3.json auth_kind: serviceaccount scopes: - 'https://www.googleapis.com/auth/cloud-platform' - 'https://www.googleapis.com/auth/compute.readonly' keyed_groups: # Create groups from GCE labels - prefix: gcp key: labels hostnames: # List host by name instead of the default public ip - name compose: # Set an inventory parameter to use the Public IP address to connect to the host # For Private ip use "networkInterfaces[0].networkIP" ansible_host: networkInterfaces[0].accessConfigs[0].natIP