From 66adb3d993c5e9679a94cc409f1a0fc5c39c23ce Mon Sep 17 00:00:00 2001 From: John R Barker Date: Mon, 31 Jul 2017 14:26:15 +0100 Subject: [PATCH] Correctly reference variables (#27486) --- lib/ansible/module_utils/aci.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/module_utils/aci.py b/lib/ansible/module_utils/aci.py index c749071bad7..71d78c50a6a 100644 --- a/lib/ansible/module_utils/aci.py +++ b/lib/ansible/module_utils/aci.py @@ -209,15 +209,15 @@ class ACIModule(object): # Handle APIC response if query['status'] != 200: - result['response'] = query['msg'] - result['status'] = query['status'] + self.result['response'] = query['msg'] + self.result['status'] = query['status'] try: # APIC error aci_response_json(self.result, query['body']) - module.fail_json(msg='Query failed: %(error_code)s %(error_text)s' % self.result, **self.result) + self.module.fail_json(msg='Query failed: %(error_code)s %(error_text)s' % self.result, **self.result) except KeyError: # Connection error - module.fail_json(msg='Query failed for %(url)s. %(msg)s' % query) + self.module.fail_json(msg='Query failed for %(url)s. %(msg)s' % query) query = json.loads(resp.read())