Has anybody succesfully used the gcp_compute plugin with auth_kind: machineaccount?

442 views
Skip to first unread message

Mpampis Mpigkonias

unread,
Sep 27, 2018, 12:06:04 PM9/27/18
to Ansible Project
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_...@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_...@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?

Rick Box

unread,
Feb 20, 2019, 7:38:27 AM2/20/19
to Ansible Project
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.
Reply all
Reply to author
Forward
0 new messages