'unable to open shell' -> direct to web help (#23267)
* 'unable to open shell' -> direct to web help The "unable to open shell" error is returned for a number of different, direct people to online docs (we we can update out of band of releases) to guide them though the various solutions. * fix pep8 errors
This commit is contained in:
parent
4540853a50
commit
529df8640b
7 changed files with 27 additions and 7 deletions
|
@ -73,7 +73,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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -69,7 +69,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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -73,7 +73,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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -74,7 +74,9 @@ class ActionModule(_ActionModule):
|
|||
display.vvvv('calling open_shell()', pc.remote_addr)
|
||||
rc, out, err = connection.exec_command('open_shell()')
|
||||
if not rc == 0:
|
||||
return {'failed': True, 'msg': 'unable to open shell'}
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -69,7 +69,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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -67,7 +67,10 @@ class ActionModule(_ActionModule):
|
|||
display.vvvv('calling open_shell()', pc.remote_addr)
|
||||
rc, out, err = connection.exec_command('open_shell()')
|
||||
if 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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
|
@ -74,7 +74,10 @@ class ActionModule(_ActionModule):
|
|||
rc, out, err = connection.exec_command('open_shell()')
|
||||
display.vvvv('open_shell() returned %s %s %s' % (rc, out, err))
|
||||
if 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}
|
||||
else:
|
||||
# make sure we are in the right cli context which should be
|
||||
# enable mode and not config module
|
||||
|
|
Loading…
Reference in a new issue