docs 📝: Refine README formatting and slightly rephrase some sentences for clarity.
Updated the README file to improve its readability and clarity by refining the formatting and rephrasing certain sentences.
This commit is contained in:
24
README.md
24
README.md
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
An Ansible role that configures **persistent Wake‑on‑LAN (WOL)** on Proxmox VE hosts.
|
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
|
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,
|
WOL on the interfaces that back the bridges you specify. Unlike many WOL setups that rely on
|
||||||
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.
|
*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
|
## How It Works
|
||||||
|
|
||||||
1. **Package Install** – Ensures the `ethtool` binary is present.
|
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.).
|
2. **Interface Discovery** – Uses `ansible_facts.ansible_interfaces` to collect *all* interfaces,
|
||||||
3. **WOL Validation** – For each remaining physical NIC, `ethtool <iface> | grep 'Wake-on'` is used to confirm that the NIC supports WOL.
|
then filters out virtual ones (`veth*`, `tap*`, `docker*`, etc.).
|
||||||
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.
|
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`.
|
5. **Idempotency Check** – The current WOL state (`wol_enabled`) is compared to `wol_mode`.
|
||||||
6. **Apply WOL** –
|
6. **Apply WOL** –
|
||||||
- If `wol_mode` ≠ `'d'` and the current mode differs, `ethtool -s <iface> wol <mode>` is run.
|
- 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.
|
- 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 }}`.
|
7. **Deploy systemd template** – Copies `templates/wol@.service.j2` to `/etc/systemd/system/wol@.service`.
|
||||||
8. **Enable service per interface** – For every affected interface, the role starts the unit `wol@<iface>.service` and enables it to run on boot.
|
The template contains `ExecStart=/usr/sbin/ethtool -s %I wol {{ wol_mode }}`.
|
||||||
9. **Report** – A final summary is printed, optionally listing MAC addresses if `wol_report_mac` is `true`.
|
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`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user