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
|
|
@ -13,7 +13,7 @@ class Task:
|
|||
|
||||
#($server='', $ssh_user='root', $ssh_key_priv='./ssh/id_rsa', $ssh_key_password='', $ssh_path='leviathan', $mysql_conn=false)
|
||||
|
||||
def __init__(self, server, conn, remote_user='root', remote_password='', private_key='./ssh/id_rsa', password_key='', remote_path='pastafari2', task_id=0, data={}):
|
||||
def __init__(self, server, conn, remote_user='root', remote_password='', private_key='./ssh/id_rsa', password_key='', remote_path='pastafari2', task_id=0, data={}, port=22):
|
||||
|
||||
self.config=config_task
|
||||
|
||||
|
|
@ -29,6 +29,8 @@ class Task:
|
|||
|
||||
self.os_server=''
|
||||
|
||||
self.port=port
|
||||
|
||||
self.files=[]
|
||||
|
||||
# Format first array element is command with the interpreter, the task is agnostic, the files in os directory. The commands are setted with 750 permission.
|
||||
|
|
@ -135,7 +137,7 @@ class Task:
|
|||
|
||||
try:
|
||||
|
||||
self.ssh.connect(self.server, port=self.config.port, username=self.remote_user, password=self.remote_password, pkey=rsa, key_filename=None, timeout=None, allow_agent=True, look_for_keys=True, compress=False, sock=None, gss_auth=False, gss_kex=False, gss_deleg_creds=True, gss_host=None, banner_timeout=None)
|
||||
self.ssh.connect(self.server, port=self.port, username=self.remote_user, password=self.remote_password, pkey=rsa, key_filename=None, timeout=None, allow_agent=True, look_for_keys=True, compress=False, sock=None, gss_auth=False, gss_kex=False, gss_deleg_creds=True, gss_host=None, banner_timeout=None)
|
||||
|
||||
if add_host:
|
||||
host_key.save(self.config.ssh_directory+'/known_hosts')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue