From 13c7d149bbc876a24e7725cabc6b8dc890cf1973 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 4 Jun 2018 13:48:15 +0530 Subject: [PATCH] openstack: Correct fail_json call in module_utils (#41064) Fixes: #40925 Signed-off-by: Abhijeet Kasurde --- lib/ansible/module_utils/openstack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/openstack.py b/lib/ansible/module_utils/openstack.py index 8485db72334..75fbfbfeffc 100644 --- a/lib/ansible/module_utils/openstack.py +++ b/lib/ansible/module_utils/openstack.py @@ -136,9 +136,9 @@ def openstack_cloud_from_module(module, min_version='0.12.0'): 'auth', 'region_name', 'verify', 'cacert', 'key', 'api_timeout', 'interface'): if module.params[param] is not None: - module.fail_json(fail_message.format(param=param)) + module.fail_json(msg=fail_message.format(param=param)) if module.params['auth_type'] != 'password': - module.fail_json(fail_message.format(param='auth_type')) + module.fail_json(msg=fail_message.format(param='auth_type')) return sdk, sdk.connect(**cloud_config) else: return sdk, sdk.connect(