Auto-detect conditional restart based on playbook tags and add CHANGELOG entry

- Override devture_systemd_service_manager_conditional_restart_enabled in
  group_vars based on ansible_run_tags: disabled when setup-* tags are used,
  enabled otherwise. This replaces the --extra-vars hack in the justfile and
  ensures consistent behavior for both `just` and raw `ansible-playbook` users.
- Revert justfile setup-all to its original form (no --extra-vars needed).
- Update docs/just.md to reflect tag-agnostic behavior.
- Add CHANGELOG.md entry documenting the conditional restart feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-02-13 14:21:07 +02:00
parent 3e73005eb3
commit 4a8df13854
4 changed files with 42 additions and 5 deletions

View File

@@ -265,6 +265,19 @@ matrix_addons_homeserver_systemd_services_list: |
# - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
# - monitoring services (Prometheus, Grafana, …) get a level of 4000 — they can start later than all-of-Matrix
# - services which aren't time-sensitive (various crons and timers) get a level of 5000 — they can start later than all-of-Matrix
# The systemd_service_manager role supports conditional restart — only restarting services
# whose configuration or container image actually changed, leaving unchanged services running.
# This is controlled by `devture_systemd_service_manager_conditional_restart_enabled` (default: true in the role).
#
# We override it here to automatically match the intent of the playbook tags being used:
# - install-* tags (regular upgrades): conditional restart ON — only changed services restart, reducing downtime
# - setup-* tags (full setup/reconfiguration): conditional restart OFF — all services restart unconditionally
#
# This ensures consistent behavior whether users invoke the playbook via `just` shortcuts
# or raw `ansible-playbook --tags=...` commands.
devture_systemd_service_manager_conditional_restart_enabled: "{{ ansible_run_tags | select('match', 'setup-') | list | length == 0 }}"
devture_systemd_service_manager_services_list_auto: |
{{
([{