Use credentials_file for GCE module auth config

This commit is contained in:
Vic Iglesias 2015-12-21 12:09:29 -06:00 committed by Matt Clay
commit 612d9c3e92
4 changed files with 65 additions and 37 deletions

View file

@ -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)