Hi there,

I assume I am missing a step in the setup:

1.) I set:

ANSIBLE_HOSTS=/...../ansible/gce.py

this files copied from the 1.8.2 branch ../plugins/inventory/gce.py

libcloud is installed with pip.

PYTHONPATH=/..../ansible

The secrets.py seems be correct as I can create a vm with a static hosts 
file.

What happens is:

./gce.py --list

Traceback (most recent call last):

  File "./gce.py", line 287, in <module>

    GceInventory()

  File "./gce.py", line 101, in __init__

    self.driver = self.get_gce_driver()

  File "./gce.py", line 177, in get_gce_driver

    gce = get_driver(Provider.GCE)(*args, **kwargs)

  File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/gce.py", 
line 605, in __init__

    self.zone_list = self.ex_list_zones()

  File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/gce.py", 
line 936, in ex_list_zones

    response = self.connection.request(request, method='GET').object

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
669, in request

    *args, **kwargs)

  File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 
696, in request

    params, headers = self.pre_connect_hook(params, headers)

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
645, in pre_connect_hook

    self.token_info = self.auth_conn.refresh_token(self.token_info)

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
369, in refresh_token

    return self.get_new_token()

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
501, in get_new_token

    return self._token_request(request)

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
348, in _token_request

    response = self.request('/o/oauth2/token', method='POST', data=data)

  File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 
736, in request

    response = responseCls(**kwargs)

  File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 
119, in __init__

    self.object = self.parse_body()

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
263, in parse_body

    (code, message) = self._get_error(body)

  File "/Library/Python/2.7/site-packages/libcloud/common/google.py", line 
204, in _get_error

    code = err.get('reason', None)

AttributeError: 'str' object has no attribute 'get'

Anything I may have done wrong?

thanks

Peter



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/23b5af27-cf52-409c-aefc-738b5946a9df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to