fixes pipe issue (#28127)

pull/28158/head
David Newswanger 8 years ago committed by Trishna Guha
parent 60ce6438e3
commit cfda267b2b

@ -242,15 +242,15 @@ from ansible.module_utils.basic import AnsibleModule
import re import re
def execute_show_command(command, module, command_type='cli_show'): def execute_show_command(command, module, command_type='cli_show'):
if module.params['transport'] == 'cli': if command_type == 'cli_show_ascii':
command += ' | json' cmds = [{
cmds = [command] 'command': command,
body = run_commands(module, cmds) 'output': 'text',
elif module.params['transport'] == 'nxapi': }]
else:
cmds = [command] cmds = [command]
body = run_commands(module, cmds)
return body return run_commands(module, cmds)
def get_interface_mode(interface, intf_type, module): def get_interface_mode(interface, intf_type, module):
@ -695,4 +695,3 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
main() main()

Loading…
Cancel
Save