From b9358eb0432f733aeca09537368c7587f7b4e2e5 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 25 Jan 2026 11:09:02 +0100 Subject: [PATCH] =?UTF-8?q?docs=20=F0=9F=93=9D:=20Refine=20README=20format?= =?UTF-8?q?ting=20and=20slightly=20rephrase=20some=20sentences=20for=20cla?= =?UTF-8?q?rity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the README file to improve its readability and clarity by refining the formatting and rephrasing certain sentences. --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7509c3a..9fc9467 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ An Ansible role that configures **persistent Wake‑on‑LAN (WOL)** on Proxmox VE hosts. It discovers all physical Ethernet interfaces, validates WOL support, and then enables or disables -WOL on the interfaces that back the bridges you specify. Unlike many WOL setups that rely on *udev* rules, -this role uses a lightweight **systemd template unit** (`wol@.service`) so the setting is applied automatically each time an interface comes up, and it survives reboots without any extra steps. +WOL on the interfaces that back the bridges you specify. Unlike many WOL setups that rely on +*udev* rules, this role uses a lightweight **systemd template unit** (`wol@.service`) so the setting +is applied automatically each time an interface comes up, and it survives reboots without any extra +steps. --- @@ -69,16 +71,22 @@ wol_report_mac: true # Include MAC addresses of WOL-capable senders in th ## How It Works 1. **Package Install** – Ensures the `ethtool` binary is present. -2. **Interface Discovery** – Uses `ansible_facts.ansible_interfaces` to collect *all* interfaces, then filters out virtual ones (`veth*`, `tap*`, `docker*`, etc.). -3. **WOL Validation** – For each remaining physical NIC, `ethtool | grep 'Wake-on'` is used to confirm that the NIC supports WOL. -4. **Bridge Mapping** – The role resolves each bridge name in `wol_bridges` to the underlying physical interface(s). If a bridge is built on a bond (e.g., `bond0`), every slave is treated as a candidate. +2. **Interface Discovery** – Uses `ansible_facts.ansible_interfaces` to collect *all* interfaces, +then filters out virtual ones (`veth*`, `tap*`, `docker*`, etc.). +3. **WOL Validation** – For each remaining physical NIC, `ethtool | grep 'Wake-on'` +is used to confirm that the NIC supports WOL. +4. **Bridge Mapping** – Resolves each bridge name in `wol_bridges` to the physical interface(s). +If a bridge is built on a bond (e.g., `bond0`), every slave is treated as a candidate. 5. **Idempotency Check** – The current WOL state (`wol_enabled`) is compared to `wol_mode`. 6. **Apply WOL** – - If `wol_mode` ≠ `'d'` and the current mode differs, `ethtool -s wol ` is run. - If `wol_mode` is `'d'`, the role ensures WOL is disabled. -7. **Deploy systemd template** – Copies `templates/wol@.service.j2` to `/etc/systemd/system/wol@.service`. The template contains `ExecStart=/usr/sbin/ethtool -s %I wol {{ wol_mode }}`. -8. **Enable service per interface** – For every affected interface, the role starts the unit `wol@.service` and enables it to run on boot. -9. **Report** – A final summary is printed, optionally listing MAC addresses if `wol_report_mac` is `true`. +7. **Deploy systemd template** – Copies `templates/wol@.service.j2` to `/etc/systemd/system/wol@.service`. +The template contains `ExecStart=/usr/sbin/ethtool -s %I wol {{ wol_mode }}`. +8. **Enable service per interface** – For every interface, the role starts the unit +`wol@.service` and enables it to run on boot. +9. **Report** – A final summary is printed, optionally listing MAC addresses if `wol_report_mac` +is `true`. ---