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:
parent
97fa41d338
commit
9e89d2be1a
1 changed files with 7 additions and 2 deletions
|
@ -51,5 +51,10 @@ class TerminalModule(TerminalBase):
|
||||||
def on_open_shell(self):
|
def on_open_shell(self):
|
||||||
try:
|
try:
|
||||||
self._exec_cli_command(b'modify cli preference display-threshold 0 pager disabled')
|
self._exec_cli_command(b'modify cli preference display-threshold 0 pager disabled')
|
||||||
except AnsibleConnectionFailure:
|
except AnsibleConnectionFailure as ex:
|
||||||
raise AnsibleConnectionFailure('unable to set terminal parameters')
|
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')
|
||||||
|
|
Loading…
Reference in a new issue