Fixes for support change port and changes for no install monit for default
This commit is contained in:
parent
2ebe22f79e
commit
7c1b903d44
11 changed files with 38 additions and 16 deletions
|
|
@ -40,6 +40,8 @@ def start(cli_args=None):
|
|||
|
||||
arr_task=task_model.select_a_row(task_id)
|
||||
|
||||
default_port=22
|
||||
|
||||
if arr_task:
|
||||
|
||||
if (arr_task['user']!='' or arr_task['password']!='') and arr_task['path']!='':
|
||||
|
|
@ -55,6 +57,9 @@ def start(cli_args=None):
|
|||
|
||||
task_model.update({'password': ''})
|
||||
|
||||
if arr_task['ssh_port']!='':
|
||||
default_port=int(arr_task['ssh_port'])
|
||||
|
||||
"""
|
||||
if not commands_to_execute:
|
||||
print('Error: no task files')
|
||||
|
|
@ -73,7 +78,7 @@ def start(cli_args=None):
|
|||
|
||||
taskmod=importlib.import_module(arr_task.get('path', ''))
|
||||
|
||||
ssh_task=taskmod.ServerTask(arr_task['server'], conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']))
|
||||
ssh_task=taskmod.ServerTask(arr_task['server'], conn, remote_user=remote_user, remote_password=remote_password, private_key=private_key, password_key=password_key, remote_path='pastafari2', task_id=task_id, data=json.loads(arr_task['data']), port=default_port)
|
||||
|
||||
ssh_task.exec()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue