Solved svc-opt-ssd-hdd path bug

This commit is contained in:
2025-08-19 21:50:55 +02:00
parent 95aba805c0
commit 838a8fc7a1
7 changed files with 21 additions and 22 deletions

View File

@@ -4,8 +4,8 @@ credentials:
algorithm: "bcrypt"
validation: "^\\$2[aby]\\$.{56}$"
OPT_DRIVE_RAPID_STORAGE_PATH:
rapid_storage:
description: "Mount path of the servers SSD"
OPT_DRIVE_MASS_STORAGE_PATH:
mass_storage:
description: "Mount path of the servers HDD"

View File

@@ -1,2 +1,5 @@
- include_role:
name: sys-service
name: sys-service
vars:
system_service_tpl_exec_start_pre: '/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(" ") }} --ignore {{ SYS_SERVICE_OPTIMIZE_DRIVE }} {{ SYS_SERVICE_BACKUP_RMT_2_LOC }} --timeout "{{ SYS_TIMEOUT_STORAGE_OPTIMIZER }}"'
system_service_tpl_exec_start: '{{ system_service_script_exec }} --mass-storage-path {{ OPT_DRIVE_MASS_STORAGE_PATH }} --rapid-storage-path {{ OPT_DRIVE_RAPID_STORAGE_PATH }}'

View File

@@ -1,8 +0,0 @@
[Unit]
Description=Optimize storage paths
OnFailure={{ SYS_SERVICE_ON_FAILURE_COMPOSE }}
[Service]
Type=oneshot
ExecStartPre=/usr/bin/python {{ PATH_SYSTEM_LOCK_SCRIPT }} {{ SYS_SERVICE_GROUP_MANIPULATION | join(' ') }} --ignore {{ SYS_SERVICE_OPTIMIZE_DRIVE }} {{ SYS_SERVICE_BACKUP_RMT_2_LOC }} --timeout "{{ SYS_TIMEOUT_STORAGE_OPTIMIZER }}"
ExecStart={{ system_service_script_exec }} --mass-storage-path {{ OPT_DRIVE_MASS_STORAGE_PATH }}

View File

@@ -1,4 +1,4 @@
application_id: svc-opt-ssd-hdd
system_service_id: "{{ application_id }}"
system_service_id: "{{ application_id }}"
OPT_DRIVE_RAPID_STORAGE_PATH: "{{ applications | get_app_conf(application_id, 'volumes.rapid_storage') }}"
OPT_DRIVE_MASS_STORAGE_PATH: "{{ applications | get_app_conf(application_id, 'volumes.mass_storage') }}"