mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Adds a tmsh command fallback (#33592)
* Adds a tmsh command fallback The bigip terminal plugin assumes that the remote shell is tmsh. This is not always true. The remote shell may be bash sometimes. This adds a different shell command in the case that bash is the remote shell * Fixing upstream errors
This commit is contained in:
@@ -51,5 +51,10 @@ class TerminalModule(TerminalBase):
|
||||
def on_open_shell(self):
|
||||
try:
|
||||
self._exec_cli_command(b'modify cli preference display-threshold 0 pager disabled')
|
||||
except AnsibleConnectionFailure:
|
||||
raise AnsibleConnectionFailure('unable to set terminal parameters')
|
||||
except AnsibleConnectionFailure as ex:
|
||||
output = str(ex)
|
||||
if 'modify: command not found' in output:
|
||||
try:
|
||||
self._exec_cli_command(b'tmsh modify cli preference display-threshold 0 pager disabled')
|
||||
except AnsibleConnectionFailure as ex:
|
||||
raise AnsibleConnectionFailure('unable to set terminal parameters')
|
||||
|
||||
Reference in New Issue
Block a user