mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
Use credentials_file for GCE module auth config
This commit is contained in:
parent
7ad225eedd
commit
612d9c3e92
4 changed files with 65 additions and 37 deletions
|
@ -91,7 +91,14 @@ options:
|
|||
pem_file:
|
||||
version_added: "1.6"
|
||||
description:
|
||||
- path to the pem file associated with the service account email
|
||||
- (deprecated) path to the pem file associated with the service account email
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
credentials_file:
|
||||
version_added: "2.1.0"
|
||||
description:
|
||||
- path to the JSON file associated with the service account email
|
||||
required: false
|
||||
default: null
|
||||
aliases: []
|
||||
|
@ -105,7 +112,7 @@ options:
|
|||
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "apache-libcloud >= 0.13.3"
|
||||
- "apache-libcloud >= 0.17.0"
|
||||
author: "Eric Johnson (@erjohnso) <erjohnso@google.com>"
|
||||
'''
|
||||
|
||||
|
@ -178,12 +185,13 @@ def main():
|
|||
state = dict(default='present'),
|
||||
service_account_email = dict(),
|
||||
pem_file = dict(),
|
||||
credentials_file = dict(),
|
||||
project_id = dict(),
|
||||
)
|
||||
)
|
||||
|
||||
if not HAS_LIBCLOUD:
|
||||
module.exit_json(msg='libcloud with GCE support (0.13.3+) required for this module')
|
||||
module.exit_json(msg='libcloud with GCE support (0.17.0+) required for this module')
|
||||
|
||||
gce = gce_connect(module)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue