Moved sys-opt-ssd-hdd to a callable version in svc-opt-ssd-hdd

This commit is contained in:
2025-07-12 11:42:25 +02:00
parent f2187e4bc0
commit c09dec8b0f
18 changed files with 48 additions and 40 deletions

View File

@@ -4,6 +4,7 @@ roles:
invokable: false
sys:
title: "System"
description: "System near components. Will be automaticly called if necessary from other roles."
invokable: false
alm:
title: "Alerting"
@@ -104,6 +105,12 @@ roles:
description: "Docker infrastructure services (DBMS, LDAP, Redis, etc.)"
icon: "fas fa-database"
invokable: true
opt:
title: "Service Optimation"
description: "Optimation Services to improve your system"
icon: "fas fa-database"
invokable: true
user:
title: "Users & Access"
description: "User accounts & access control"

View File

@@ -16,7 +16,7 @@
group: administrator
when: run_once_docker is not defined
- name: Set docker_enabled to true, to activate sys-opt-ssd-hdd
- name: Set docker_enabled to true, to activate svc-opt-ssd-hdd
set_fact:
docker_enabled: true
when: run_once_docker is not defined

View File

@@ -0,0 +1,5 @@
- name: "reload svc-opt-ssd-hdd.cymais.service"
systemd:
name: svc-opt-ssd-hdd.cymais.service
state: reloaded
daemon_reload: yes

View File

@@ -0,0 +1,22 @@
- name: "create {{storage_optimizer_directory}}"
file:
path: "{{storage_optimizer_directory}}"
state: directory
mode: 0755
- name: create svc-opt-ssd-hdd.cymais.service
template:
src: svc-opt-ssd-hdd.service.j2
dest: /etc/systemd/system/svc-opt-ssd-hdd.cymais.service
notify: reload svc-opt-ssd-hdd.cymais.service
- name: create svc-opt-ssd-hdd.py
copy:
src: svc-opt-ssd-hdd.py
dest: "{{storage_optimizer_script}}"
mode: 0755
- name: "optimize storage performance"
systemd:
name: svc-opt-ssd-hdd.cymais.service
state: started

View File

@@ -4,5 +4,5 @@ OnFailure=sys-alm-compose.cymais@%n.service
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore sys-opt-ssd-hdd svc-sys-bkp-rmt-2-loc --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_lock_script }} {{ system_maintenance_services | join(' ') }} --ignore svc-opt-ssd-hdd svc-sys-bkp-rmt-2-loc --timeout "{{system_maintenance_lock_timeout_storage_optimizer}}"'
ExecStart=/bin/sh -c '/usr/bin/python {{storage_optimizer_script}} --rapid-storage-path {{path_rapid_storage}} --mass-storage-path {{path_mass_storage}}'

View File

@@ -0,0 +1,3 @@
storage_optimizer_directory: '{{path_administrator_scripts}}svc-opt-ssd-hdd/'
storage_optimizer_script: '{{storage_optimizer_directory}}svc-opt-ssd-hdd.py'
application_id: svc-opt-ssd-hdd

View File

@@ -1,5 +0,0 @@
- name: "reload sys-opt-ssd-hdd.cymais.service"
systemd:
name: sys-opt-ssd-hdd.cymais.service
state: reloaded
daemon_reload: yes

View File

@@ -1,22 +0,0 @@
- name: "create {{storage_optimizer_directory}}"
file:
path: "{{storage_optimizer_directory}}"
state: directory
mode: 0755
- name: create sys-opt-ssd-hdd.cymais.service
template:
src: sys-opt-ssd-hdd.service.j2
dest: /etc/systemd/system/sys-opt-ssd-hdd.cymais.service
notify: reload sys-opt-ssd-hdd.cymais.service
- name: create sys-opt-ssd-hdd.py
copy:
src: sys-opt-ssd-hdd.py
dest: "{{storage_optimizer_script}}"
mode: 0755
- name: "optimize storage performance"
systemd:
name: sys-opt-ssd-hdd.cymais.service
state: started

View File

@@ -1,2 +0,0 @@
storage_optimizer_directory: '{{path_administrator_scripts}}sys-opt-ssd-hdd/'
storage_optimizer_script: '{{storage_optimizer_directory}}sys-opt-ssd-hdd.py'