Optimized system services included suppress option and solved bugs

This commit is contained in:
2025-08-27 17:34:59 +02:00
parent a8f4dea9d2
commit bae2bc21ec
6 changed files with 16 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
SYS_SERVICE_ALL_ENABLED: "{{ MODE_DEBUG }}"
SYS_SERVICE_DEFAULT_STATE: "{{ 'restarted' if MODE_DEBUG else omit }}"
SYS_SERVICE_DEFAULT_RUNTIME: "86400s" # Maximum total runtime a service is allowed to run before being stopped
SYS_SERVICE_DEFAULT_RUNTIME: "86400s" # Maximum total runtime a service is allowed to run before being stopped
SYS_SERVICE_SUPPRESS_FLUSH: [] # Services where the flush should be suppressed

View File

@@ -46,5 +46,5 @@
command: /bin/true
notify: refresh systemctl service
when: not system_service_uses_at
when: SYS_SERVICE_ALL_ENABLED | bool or system_force_flush | bool
when: (SYS_SERVICE_ALL_ENABLED | bool or system_force_flush | bool) and not system_service_suppress_flush | bool

View File

@@ -6,9 +6,10 @@ system_service_role_dir: "{{ [ playbook_dir, 'roles', system_service_role_
system_service_script_dir: "{{ [ PATH_SYSTEMCTL_SCRIPTS, system_service_id ] | path_join }}"
## Settings
system_force_flush: false # When set to true it activates the flushing of services :)
system_service_copy_files: true # When set to false file copying will be skipped
system_service_timer_enabled: false # When set to true timer will be loaded
system_force_flush: false # When set to true it activates the flushing of services :)
system_service_suppress_flush: "{{ (system_service_id in SYS_SERVICE_SUPPRESS_FLUSH) | bool }}" # When set to true it suppresses the flushing of services
system_service_copy_files: true # When set to false file copying will be skipped
system_service_timer_enabled: false # When set to true timer will be loaded
system_service_state: "{{ SYS_SERVICE_DEFAULT_STATE }}"
# Dynamic Loaded ( Just available when dependencies are loaded )