gce.py issues authenticating to GCE

95 views
Skip to first unread message

Alex Leonhardt

unread,
Jan 9, 2016, 11:07:18 AM1/9/16
to Ansible Project
Hi,

So I've been trying to get gce to work, but no luck - it used to work, something changed, and now it isn't - not sure what happened, but I tried to setup everything from scratch again ... 

On GCE, I've created a service account, when creating the account, I ticked the box to allow domain-wide delegation (DwD), the p12 got downloaded automatically and the pem extracted with the command from the ansible site (https://docs.ansible.com/ansible/guide_gce.html#credentials) and stored as ansible.pem, I then clicked on "View client ID", edited the name (ansible) and saved it.

I've attached some screenshots that should help (I hope) ... 



Service account details / list : 

View client detail : 


The secrets.py has the following : 

GCE_PARAMS = ('ansible@********.iam.gserviceaccount.com', '/full/path/to/ansible.pem')
GCE_KEYWORD_PARAMS = {'project': '********'}

The gce.ini has the following : 

[gce]
libcloud_secrets = /full/path/to/secrets.py

But now I get this output : 


Anyone got any ideas ? Any way to debug this ? 

Thanks!
Alex

Eric Johnson

unread,
Jan 11, 2016, 2:03:49 PM1/11/16
to Ansible Project
I haven't done any testing to confirm, but it could be related to this: https://github.com/apache/libcloud/commit/88170f6582dd6cc3bce87c0ab3a89118551fe508 and ansible not yet supporting the new email address format for client_id.  You could try running libcloud from trunk (or making that one-line hack to your local install) to see if that fixes the issue.
Reply all
Reply to author
Forward
0 new messages