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
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