'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:
John R Barker 2017-04-06 10:11:28 +01:00 committed by GitHub
parent 4540853a50
commit 529df8640b
7 changed files with 27 additions and 7 deletions

View file

@ -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