mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
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):
|
||||
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')
|
||||
|
|
Loading…
Reference in a new issue