We are trying to configure Google compute engine resources using dynamic inventory in ANSIBLE
We are getting the below error when we run the command: $ ./gce.py --list
File “./gce.py”, line 508, in
GceInventory()
File “./gce.py”, line 170, in init
self.driver = self.get_gce_driver()
File “./gce.py”, line 318, in get_gce_driver
gce = get_driver(Provider.GCE)(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py”, line 1058, in init
self.zone_list = self.ex_list_zones()
File “/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py”, line 1790, in ex_list_zones
response = self.connection.request(request, method=‘GET’).object
File “/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py”, line 120, in request
response = super(GCEConnection, self).request(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 718, in request
args, *kwargs)
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py”, line 748, in request
params, headers = self.pre_connect_hook(params, headers)
File “/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py”, line 109, in pre_connect_hook
headers)
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 697, in pre_connect_hook
self._refresh_oauth2_token()
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 772, in _refresh_oauth2_token
self.oauth2_token = self.oauth2_conn.refresh_token(self.oauth2_token)
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 382, in refresh_token
return self.get_new_token()
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 530, in get_new_token
return self._token_request(request)
File “/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py”, line 360, in _token_request
raise GoogleAuthError('Invalid authorization response, please ’
libcloud.common.google.GoogleAuthError: ‘Invalid authorization response, please check your credentials and time drift.’