From 1c95de8659d218c1b71324a9a658f4bdaebc3696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Tue, 27 Jul 2021 13:39:12 +0200 Subject: [PATCH] allow turbo mode, but disabled by default Depends-On: https://github.com/ansible-collections/cloud.common/pull/73 --- plugins/module_utils/ansiblemodule.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/module_utils/ansiblemodule.py b/plugins/module_utils/ansiblemodule.py index a647b163f8a..e1f63c9b243 100644 --- a/plugins/module_utils/ansiblemodule.py +++ b/plugins/module_utils/ansiblemodule.py @@ -3,4 +3,11 @@ __metaclass__ = type -from ansible.module_utils.basic import AnsibleModule # noqa: F401 +try: + from ansible_collections.cloud.common.plugins.module_utils.turbo.module import ( + AnsibleTurboModule as AnsibleModule, + ) # noqa: F401 + AnsibleModule.collection_name = "kubernetes.core" + AnsibleModule.enable_session_cache_default = False +except ImportError: + from ansible.module_utils.basic import AnsibleModule # noqa: F401