docs 📝: Refine README formatting and slightly rephrase some sentences for clarity.
Some checks failed
ansible-lint / Ansible Lint (push) Successful in 10s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Failing after 1m18s

Updated the README file to improve its readability and clarity by refining the formatting and rephrasing certain sentences.
This commit is contained in:
2026-01-25 11:09:02 +01:00
parent 36401dc8f4
commit b9358eb043

View File

@@ -2,8 +2,10 @@
An Ansible role that configures **persistent WakeonLAN (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 <iface> | 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 <iface> | 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 <iface> wol <mode>` 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@<iface>.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@<iface>.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`.
---