mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-26 21:45:20 +02:00
- Swap role includes: sys-systemctl → sys-service in all roles - Rename variables everywhere: systemctl_* → system_service_* (incl. systemctl_id → system_service_id) - Templates: ExecStart now uses {{ system_service_script_exec }}; add optional RuntimeMaxSec via SYS_SERVICE_DEFAULT_RUNTIME - Move SYS_SERVICE defaults into roles/sys-service/defaults (remove SYS_SERVICE_ALL_ENABLED & SYS_SERVICE_DEFAULT_STATE from group_vars/07_services.yml) - Tidy group_vars/all/08_timer.yml formatting - Introduce roles/sys-daemon: - default manager timeouts (timeouts.conf) - optional purge of /etc/systemd/system.conf.d - validation via systemd-analyze verify - handlers for daemon-reload & daemon-reexec - Refactor sys-timer to system_service_* variables (docs and templates updated) - Move filter_plugins/filetype.py under sys-service - Update meta/README to point to official systemd docs - Touch many roles (backup/cleanup/health/repair/certs/nginx/csp/wireguard/ssd-hdd/keyboard/update-docker/alarm compose/email/telegram/etc.) to new naming BREAKING CHANGE: - Role path/name change: use `sys-service` instead of `sys-systemctl` - All `systemctl_*` vars are now `system_service_*` (e.g., on_calendar, state, timer_enabled, script_exec, id) - If you have custom templates, adopt RuntimeMaxSec and new variable names Chat context: https://chatgpt.com/share/68a47568-312c-800f-af3f-e98575446327
49 lines
2.0 KiB
YAML
49 lines
2.0 KiB
YAML
# Mapping logic for backup-docker-to-local CLI arguments
|
|
#
|
|
# - BKP_DOCKER_2_LOC_DB_ROUTINE: All service names where backup.database_routine is set (for --database-containers)
|
|
# - BKP_DOCKER_2_LOC_NO_STOP_REQUIRED: All images where backup.no_stop_required is set (for --images-no-stop-required)
|
|
# - BKP_DOCKER_2_LOC_DISABLED: All images where backup.disabled is set (for --images-no-backup-required)
|
|
# CLI-ready variables render these lists as argument strings.
|
|
|
|
system_service_id: sys-ctl-bkp-docker-2-loc
|
|
|
|
# Verify if DB is enabled
|
|
BKP_DOCKER_2_LOC_DB_ENABLED: "{{ database_type | default('') | bool }}"
|
|
|
|
# Gather mapped values as lists
|
|
BKP_DOCKER_2_LOC_DB_ROUTINE: >-
|
|
{{ applications | find_dock_val_by_bkp_entr('database_routine', 'name') | list }}
|
|
|
|
BKP_DOCKER_2_LOC_NO_STOP_REQUIRED: >-
|
|
{{ applications | find_dock_val_by_bkp_entr('no_stop_required', 'image') | list }}
|
|
|
|
BKP_DOCKER_2_LOC_DISABLED: >-
|
|
{{ applications | find_dock_val_by_bkp_entr('disabled', 'image') | list }}
|
|
|
|
# CLI argument strings (only set if list not empty)
|
|
BKP_DOCKER_2_LOC_DB_ROUTINE_CLI: >-
|
|
{% if BKP_DOCKER_2_LOC_DB_ROUTINE | length > 0 -%}
|
|
--database-containers {{ BKP_DOCKER_2_LOC_DB_ROUTINE | join(' ') }}
|
|
{%- endif %}
|
|
|
|
BKP_DOCKER_2_LOC_NO_STOP_REQUIRED_CLI: >-
|
|
{% if BKP_DOCKER_2_LOC_NO_STOP_REQUIRED | length > 0 -%}
|
|
--images-no-stop-required {{ BKP_DOCKER_2_LOC_NO_STOP_REQUIRED | join(' ') }}
|
|
{%- endif %}
|
|
|
|
BKP_DOCKER_2_LOC_DISABLED_CLI: >-
|
|
{% if BKP_DOCKER_2_LOC_DISABLED | length > 0 -%}
|
|
--images-no-backup-required {{ BKP_DOCKER_2_LOC_DISABLED | join(' ') }}
|
|
{%- endif %}
|
|
|
|
# List of CLI args for convenience (e.g. for looping or joining)
|
|
BKP_DOCKER_2_LOC_CLI_ARGS_LIST:
|
|
- "{{ BKP_DOCKER_2_LOC_DB_ROUTINE_CLI }}"
|
|
- "{{ BKP_DOCKER_2_LOC_NO_STOP_REQUIRED_CLI }}"
|
|
- "{{ BKP_DOCKER_2_LOC_DISABLED_CLI }}"
|
|
|
|
BKP_DOCKER_2_LOC_EXEC: >-
|
|
/usr/bin/python {{ backup_docker_to_local_folder }}backup-docker-to-local.py
|
|
--compose-dir {{ PATH_DOCKER_COMPOSE_INSTANCES }}
|
|
{{ BKP_DOCKER_2_LOC_CLI_ARGS_LIST | select('string') | join(' ') }}
|