From 13dc02d49dc29842db725a725e5439978649fff1 Mon Sep 17 00:00:00 2001 From: John R Barker Date: Thu, 6 Apr 2017 12:39:59 +0100 Subject: [PATCH] More network_debug_troubleshooting.html (#23335) More "unable to open shell" -> network_debug_troubleshooting.html --- lib/ansible/plugins/action/junos.py | 5 ++++- lib/ansible/plugins/action/sros.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/action/junos.py b/lib/ansible/plugins/action/junos.py index 68e5bfe2824..d347940bc3b 100644 --- a/lib/ansible/plugins/action/junos.py +++ b/lib/ansible/plugins/action/junos.py @@ -86,7 +86,10 @@ class ActionModule(_ActionModule): rc, out, err = connection.exec_command('open_shell()') if rc != 0: - return {'failed': True, 'msg': 'unable to connect to control socket'} + return {'failed': True, + 'msg': 'unable to open shell. Please see: ' + + 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell', + 'rc': rc} elif pc.connection == 'network_cli': # make sure we are in the right cli context which should be diff --git a/lib/ansible/plugins/action/sros.py b/lib/ansible/plugins/action/sros.py index 49738cd0ce0..c3fa842c5bd 100644 --- a/lib/ansible/plugins/action/sros.py +++ b/lib/ansible/plugins/action/sros.py @@ -71,7 +71,10 @@ class ActionModule(_ActionModule): # start the connection if it isn't started rc, out, err = connection.exec_command('open_shell()') if not rc == 0: - return {'failed': True, 'msg': 'unable to open shell', 'rc': rc} + return {'failed': True, + 'msg': 'unable to open shell. Please see: ' + + 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell', + 'rc': rc} task_vars['ansible_socket'] = socket_path