From 414eaefcb56572526a6da5f53d2c7051d458f5c8 Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Tue, 14 Nov 2017 16:28:33 +0530 Subject: [PATCH] Fix idempotency issue for network modules. (#32838) After the connection refactor if response value returned from the remote device is empty in that case an `ok` return value is send to module side code. To avoid this do not overwrite the empty response received from remote device in `jsonrpc` reply. --- lib/ansible/utils/jsonrpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/utils/jsonrpc.py b/lib/ansible/utils/jsonrpc.py index 12ef7210cb8..8903d73a26c 100644 --- a/lib/ansible/utils/jsonrpc.py +++ b/lib/ansible/utils/jsonrpc.py @@ -83,7 +83,7 @@ class JsonRpcServer(object): def response(self, result=None): response = self.header() - response['result'] = result or 'ok' + response['result'] = result return response def error(self, code, message, data=None):