From 0ef16b44ca35dfb9b9f0e69a59647fb8a7499c88 Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Mon, 26 Sep 2016 22:43:05 -0400 Subject: [PATCH] fixes exception being raised when show configuration command issued (#5047) The junos_command expects commands to be returned as xml by default but `show configuration [options]` will return text not xml. This fix will set the output format for any command that starts with `show configuration` to text fixes #4628 --- lib/ansible/modules/network/junos/junos_command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/network/junos/junos_command.py b/lib/ansible/modules/network/junos/junos_command.py index fd81285824e..faf6a4772e2 100644 --- a/lib/ansible/modules/network/junos/junos_command.py +++ b/lib/ansible/modules/network/junos/junos_command.py @@ -205,6 +205,10 @@ def parse(module, command_type): item['command_type'] = command_type + # show configuration [options] will return as text + if item['command'].startswith('show configuration'): + item['output'] = 'text' + parsed.append(item) return parsed