Files
computer-playbook/roles/sys-service
Kevin Veen-Birkenbach 3224e24d76 Refactor systemd handling
- sys-ctl-rpr-btrfs-balancer: suppress service flush for btrfs balancer (too expensive to run each play)
- sys-daemon: replace raw systemctl calls with ansible.builtin.systemd (daemon_reload, daemon_reexec)
- sys-service: split handler into 'Enable systemctl service' and 'Set systemctl service state', add become, async/poll, suppress flush guard

Conversation: https://chatgpt.com/share/68c2f7a6-6fe4-800f-9d79-3e3b0ab4a563
2025-09-11 18:24:21 +02:00
..
2025-09-11 18:24:21 +02:00
2025-08-26 17:13:29 +02:00

sys-service

Description

Role to manage systemd service units for Infinito.Nexus software stacks.
It installs or removes unit files, configures runtime behavior, and ensures services are properly deployed.

Overview

  • Resets service units by removing old or obsolete definitions.
  • Deploys new service unit files and service scripts.
  • Optionally sets up timers linked to the services.
  • Ensures correct reload/restart behavior across the stack.

Features

  • Unit Cleanup: Automated removal of old service units.
  • Custom Templates: Supports both systemctl.service.j2 and systemctl@.service.j2.
  • Timers: Integrates with sys-timer for scheduled execution.
  • Runtime Limits: Configurable RuntimeMaxSec per service.
  • Handlers: Automatic reload/restart of services when definitions change.

Further Resources