# Has anybody succesfully used the gcp\_compute plugin with auth\_kind: machineaccount?

**URL:** <https://forum.ansible.com/t/has-anybody-succesfully-used-the-gcp-compute-plugin-with-auth-kind-machineaccount/28666>\
**Category:** Ansible Project\
**Tags:** gcp\
**Created:** [September 27, 2018, 4:06pm UTC](https://forum.ansible.com/t/has-anybody-succesfully-used-the-gcp-compute-plugin-with-auth-kind-machineaccount/28666 "2018-09-27T16:06:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mpampis\_Mpigkonias](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Mpampis\_Mpigkonias](https://forum.ansible.com/u/Mpampis_Mpigkonias)\
**Post date:** [September 27, 2018, 4:06pm UTC](https://forum.ansible.com/t/has-anybody-succesfully-used-the-gcp-compute-plugin-with-auth-kind-machineaccount/28666/1 "2018-09-27T16:06:04Z")

</div>

There is some lack of documentation when it comes on using the gcp\_compute plugin a different auth\_kind other thatn serviceaccount.

My yml is this:

> plugin: gcp\_compute  
> projects:
> 
> - my\_project  
> service\_account\_email: [my\_mail@gmail.com](mailto:my_mail@gmail.com)  
> filters: null  
> auth\_kind: machineaccount

When I run it with `ansible-inventory --list -i foo.gcp.yml`

I get the following error:

> Failed to parse /Users/user/Workspace/cluster\_create/inventory/foo.gcp.yml with auto plugin:  
> HTTPConnectionPool(host=‘metadata.google.internal’, port=80): Max retries exceeded with url: /computeMetadata/v1/instance/service-  
> accounts/my\_mail@gmail.com/?recursive=true (Caused by NewConnectionError(‘\<urllib3.connection.HTTPConnection object at 0x111cc1090\>: Failed to  
> establish a new connection: [Errno 8] nodename nor servname provided, or not known’,))

Am I missing something here?

---

<div class="post-metadata">

**Author:** ![Rick\_Box](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Rick\_Box](https://forum.ansible.com/u/Rick_Box)\
**Post date:** [February 20, 2019, 12:38pm UTC](https://forum.ansible.com/t/has-anybody-succesfully-used-the-gcp-compute-plugin-with-auth-kind-machineaccount/28666/2 "2019-02-20T12:38:27Z")

</div>

`

plugin: gcp\_compute  
projects:

- PROJECT  
service\_account\_email: ACCOUNT  
filters:  
auth\_kind: machineaccount

`

I had some success with the following. Hopefully it will help someone since the Ansible documentation has no examples.
