Compare commits

...

1 Commits

Author SHA1 Message Date
uumas
c06b228be6 Add systemd role for restarting multiple services in same transaction 2026-03-11 22:15:34 +02:00
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
---
systemd_restart_units: []

View File

@@ -0,0 +1,14 @@
---
- name: Reload systemd daemon
ansible.builtin.systemd_service:
daemon_reload: true
- name: Apply systemd unit restarts # noqa: command-instead-of-module
ansible.builtin.command:
cmd: systemctl restart {{ systemd_restart_units | join(' ') }}
changed_when: true
- name: Reset systemd restart units
listen: Apply systemd units restart
ansible.builtin.set_fact:
systemd_restart_units: []