First files to the project
This commit is contained in:
commit
cda8eb1232
26 changed files with 2657 additions and 0 deletions
83
libraries/configtask.py
Normal file
83
libraries/configtask.py
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
class ConfigTask:
|
||||
|
||||
def __init__(self):
|
||||
|
||||
#Local paths
|
||||
|
||||
# Scheme: code task: {description task, module task}
|
||||
|
||||
self.libraries={}
|
||||
|
||||
self.base_path=os.path.dirname(os.path.dirname(__file__))
|
||||
|
||||
self.tasks_path=['tasks', 'modules/pastafari2/tasks']
|
||||
|
||||
self.scripts_path=['scripts', 'modules/pastafari2/scripts']
|
||||
|
||||
self.logs_path='logs'
|
||||
|
||||
#Remote paths
|
||||
|
||||
self.remote_path='/home/spanel'
|
||||
|
||||
#Relative to remote_path
|
||||
|
||||
self.tmp_sftp_path='tmp'
|
||||
|
||||
self.remote_user='spanel'
|
||||
|
||||
self.remote_password=None
|
||||
|
||||
#Local home
|
||||
|
||||
self.home=''
|
||||
|
||||
#SSH configuration
|
||||
|
||||
self.user_key=''
|
||||
|
||||
self.public_key=''
|
||||
|
||||
self.private_key=''
|
||||
|
||||
self.password_key=None
|
||||
|
||||
self.port=22
|
||||
|
||||
self.deny_missing_host_key=True
|
||||
|
||||
#Internal tasks
|
||||
|
||||
self.num_of_forks=10
|
||||
|
||||
self.stop_if_error=False
|
||||
|
||||
self.num_errors=0
|
||||
|
||||
self.num_success=0
|
||||
|
||||
self.num_total=0
|
||||
|
||||
self.num_servers=0
|
||||
|
||||
self.file_resume=None
|
||||
|
||||
#Used if in next versions, pastafari try use others tasks servers.
|
||||
|
||||
self.server_task='http://127.0.0.1:1337'
|
||||
|
||||
self.url_host=''
|
||||
|
||||
self.url_monit=''
|
||||
|
||||
self.api_key=''
|
||||
|
||||
self.ssh_directory=os.path.expanduser('~')+'/.ssh'
|
||||
|
||||
# Class for global configuration
|
||||
|
||||
config_task=ConfigTask()
|
||||
Loading…
Add table
Add a link
Reference in a new issue