mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-09 12:20:27 -07:00
Adding exception type on Ansible Service Account Keys (#174)
<!-- This change is generated by MagicModules. --> /cc @rambleraptor
This commit is contained in:
parent
2b3eff6d82
commit
6cbacba697
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ def key_name_from_file(filename, module):
|
|||
try:
|
||||
json_data = json.loads(f.read())
|
||||
return "projects/{project_id}/serviceAccounts/{client_email}/keys/{private_key_id}".format(**json_data)
|
||||
except:
|
||||
except ValueError as inst:
|
||||
module.fail_json(msg="File is not a valid GCP JSON service account key")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue