diff options
| author | Ahmed AbdelHalim <[email protected]> | 2026-07-03 00:25:39 +0200 |
|---|---|---|
| committer | Ahmed AbdelHalim <[email protected]> | 2026-07-03 00:25:39 +0200 |
| commit | e89dee079d3453b3965b0bed59233c19825704ee (patch) | |
| tree | ca648c51d507b79cdfce4e5a75d08c283ec0cc05 | |
| parent | 0bee2f0c91154d84e0c1c480fbb4ebfaf5e5fc11 (diff) | |
Add ethtool and configure interface for pve
| -rw-r--r-- | configure.yml | 1 | ||||
| -rw-r--r-- | host_vars/pve.local.yml | bin | 814 -> 848 bytes | |||
| -rw-r--r-- | roles/ethtool/README.md | 59 |
3 files changed, 60 insertions, 0 deletions
diff --git a/configure.yml b/configure.yml index ae5d707d..db599780 100644 --- a/configure.yml +++ b/configure.yml @@ -118,3 +118,4 @@ - role: "vim" - role: "prometheus-node-exporter" - role: "restic" + - role: "ethtool" diff --git a/host_vars/pve.local.yml b/host_vars/pve.local.yml Binary files differindex c02cda9d..a9e89f47 100644 --- a/host_vars/pve.local.yml +++ b/host_vars/pve.local.yml diff --git a/roles/ethtool/README.md b/roles/ethtool/README.md new file mode 100644 index 00000000..c1902568 --- /dev/null +++ b/roles/ethtool/README.md @@ -0,0 +1,59 @@ +# ethtool Role + +Installs ethtool and configures Wake-on-LAN (WoL) via a systemd service. + +## Variables + +```yaml +ethtool_wol_interface: "eth0" # Network interface to enable WoL on +``` + +## Usage + +```yaml +- role: "ethtool" + vars: + ethtool_wol_interface: "enp0s25" +``` + +## Enabling Wake-on-LAN + +Three steps required: + +### 1. BIOS Configuration (manual) + +**ThinkPad:** +1. Reboot → press `Enter` then `F1` at Lenovo splash +2. **Config** → **Network** → **Wake On LAN** → `AC Only` or `AC and Battery` +3. `F10` to save + +**Other systems:** look in BIOS under **Power** → **APM** or **Advanced Power Management** → **Wake on LAN**. +Also disable **ErP/EuP Ready** to keep NIC powered during sleep. + +### 2. Ansible (this role) + +Enables WoL on the NIC via ethtool on every boot. Add to your play with the correct interface: + +```yaml +ethtool_wol_interface: "enp0s25" +``` + +### 3. Suspend the host + +WoL is most reliable from suspend (S3). Shutdown (S5) requires BIOS "WoL from S5" support. + +```bash +systemctl suspend +``` + +## Sending the Magic Packet + +From another host or FritzBox UI (**Home Network → Network → device → Wake on LAN**). + +## Verify WoL is enabled + +```bash +ethtool enp0s25 | grep Wake +# Wake-on: g ← means WoL is active +# Wake-on: d ← means WoL is disabled +``` |
