refactor ♻️: Refactor handler to reload systemd and restart WOL service.

This commit refactors the handler to include functionality for reloading systemd and restarting the Wake-on-LAN (WOL) service, improving system management capabilities.
This commit is contained in:
2025-12-21 21:40:27 +01:00
parent 7f86cae2ed
commit 724d67982a
2 changed files with 52 additions and 24 deletions

View File

@@ -1,9 +1,7 @@
---
- name: Reload systemd
command: systemctl daemon-reexec
- name: Enable and start WOL service
systemd:
name: wol.service
enabled: yes
state: started
- name: Reload systemd and restart WOL
ansible.builtin.systemd:
name: wol
daemon_reload: true
enabled: true
state: restarted