summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/gce.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/module_utils/gce.py')
-rw-r--r--lib/ansible/module_utils/gce.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/gce.py b/lib/ansible/module_utils/gce.py
index 85717bb5c5..1084b9dccd 100644
--- a/lib/ansible/module_utils/gce.py
+++ b/lib/ansible/module_utils/gce.py
@@ -40,10 +40,11 @@ except ImportError:
USER_AGENT_PRODUCT = "Ansible-gce"
USER_AGENT_VERSION = "v1"
-def gce_connect(module, provider=Provider.GCE):
+def gce_connect(module, provider=None):
"""Return a GCP connection for Google Compute Engine."""
if not HAS_LIBCLOUD_BASE:
module.fail_json(msg='libcloud must be installed to use this module')
+ provider = provider or Provider.GCE
return gcp_connect(module, provider, get_driver, USER_AGENT_PRODUCT, USER_AGENT_VERSION)