mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 19:00:27 -07:00
Allow home path expansion on GCP service account files (#44863)
* Allowing home path expansion on GCP service account files #42974 * wrong name for changelog
This commit is contained in:
parent
66d55eebec
commit
cc65b8477b
1 changed files with 2 additions and 2 deletions
|
@ -125,8 +125,8 @@ class GcpSession(object):
|
|||
credentials, project_id = google.auth.default()
|
||||
return credentials
|
||||
elif cred_type == 'serviceaccount':
|
||||
return service_account.Credentials.from_service_account_file(
|
||||
self.module.params['service_account_file'])
|
||||
path = os.path.realpath(os.path.expanduser(self.module.params['service_account_file']))
|
||||
return service_account.Credentials.from_service_account_file(path)
|
||||
elif cred_type == 'machineaccount':
|
||||
return google.auth.compute_engine.Credentials(
|
||||
self.module.params['service_account_email'])
|
||||
|
|
Loading…
Add table
Reference in a new issue