mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-08-09 08:03:53 +00:00
fix: failure when changing network device passwords through a gateway
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
password: "{{ account.secret }}"
|
||||
commands: "{{ params.commands }}"
|
||||
first_conn_delay_time: "{{ first_conn_delay_time | default(0.5) }}"
|
||||
gateway_args: "{{ jms_asset.ansible_ssh_common_args | default(None) }}"
|
||||
old_ssh_version: "{{ jms_asset.old_ssh_version | default(False) }}"
|
||||
ignore_errors: true
|
||||
when: ping_info is succeeded
|
||||
register: change_info
|
||||
|
||||
@@ -174,7 +174,7 @@ class SSHClient:
|
||||
self.client.connect(**self.connect_params)
|
||||
self.is_connect = True
|
||||
err_msg = self.switch_user()
|
||||
self.after_runner_end()
|
||||
# self.after_runner_end()
|
||||
except Exception as err:
|
||||
err_msg = str(err)
|
||||
return err_msg
|
||||
@@ -205,6 +205,8 @@ class SSHClient:
|
||||
output += received_output
|
||||
except Exception as e:
|
||||
error_msg = str(e)
|
||||
finally:
|
||||
self.after_runner_end()
|
||||
return output, error_msg
|
||||
|
||||
def __del__(self):
|
||||
|
||||
Reference in New Issue
Block a user