From b3980029daae71c4e723c30edd2b299c973ff6ec Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 5 Dec 2018 11:22:48 -0800 Subject: [PATCH] Ansible: Auth fix for scopes (#140) /cc @rambleraptor --- lib/ansible/module_utils/gcp_utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/ansible/module_utils/gcp_utils.py b/lib/ansible/module_utils/gcp_utils.py index beb5d0ef2863f9..d6d644de3ce88c 100644 --- a/lib/ansible/module_utils/gcp_utils.py +++ b/lib/ansible/module_utils/gcp_utils.py @@ -142,9 +142,6 @@ def _credentials(self): elif cred_type == 'serviceaccount' and self.module.params.get('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).with_scopes(self.module.params['scopes']) - elif cred_type == 'serviceaccount' and self.module.params.get('service_account_contents'): - cred = json.loads(self.module.params.get('service_account_contents')) - return service_account.Credentials.from_service_account_info(cred).with_scopes(self.module.params['scopes']) elif cred_type == 'machineaccount': return google.auth.compute_engine.Credentials( self.module.params['service_account_email'])