Fix in task

This commit is contained in:
Antonio de la Rosa 2022-02-13 16:30:03 +01:00
parent 3688f2858a
commit abe917faec
2 changed files with 2 additions and 2 deletions

View file

@ -213,7 +213,7 @@ def pastafari2_add_server_task():
if group_id!='': if group_id!='':
server_group=ServerGroup(db) server_group=ServerGroup(db)
arr_group=server_group.set_conditions('WHERE id=%s', [group_id]).select_a_row_where() arr_group=server_group.set_conditions('WHERE id=%s', [group_id]).select_a_row_where()
group_name=arr_group['group'] group_name=arr_group['code_group']
data={'ssh_user': ssh_user, 'pub_key': public_key, 'url_stats': config.domain_url+url_for('monit_app.monit_get_data', api_key=config.monit_api_key), 'hostname': server_host, 'ip': ip, 'group_id': group_id, 'group_name': group_name} data={'ssh_user': ssh_user, 'pub_key': public_key, 'url_stats': config.domain_url+url_for('monit_app.monit_get_data', api_key=config.monit_api_key), 'hostname': server_host, 'ip': ip, 'group_id': group_id, 'group_name': group_name}

View file

@ -23,7 +23,7 @@ class ServerTask(Task):
self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_python.sh', '']) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_python.sh', ''])
self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_git.py', '']) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_git.py', ''])
self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_psutil.sh', '']) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_psutil.sh', ''])
self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_pzoo_stats.py', '--user='+self.data['ssh_user']+' --pub_key='+self.data['pub_key']+' --url_stats='+self.data['url_stats']+' --group='+self.data['group_name']]) self.commands_to_execute.append(['modules/pastafari2/scripts/system/install_pzoo_stats.py', '--user='+self.data['ssh_user']+' --pub_key='+self.data['pub_key']+' --url_stats='+self.data['url_stats']+' --group="'+self.data['group_name']+'"'])
def post_task(self): def post_task(self):