diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 058c0b946ff..f4cd90e0c3e 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -269,7 +269,7 @@ class Cli(NxapiConfigMixin, CliBase): cmds = list(prepare_commands(commands)) responses = self.execute(cmds) for index, cmd in enumerate(commands): - if cmd.output == 'json': + if cmd.output == 'json' and cmd.args.get('raw') is False: try: responses[index] = json.loads(responses[index]) except ValueError: