community.windows.win_wakeonlan (2.2.0) — module

Send a magic Wake-on-LAN (WoL) broadcast packet

Authors: Dag Wieers (@dagwieers)

Install collection

Install with ansible-galaxy collection install community.windows:==2.2.0


Add to requirements.yml

  collections:
    - name: community.windows
      version: 2.2.0

Description

The C(win_wakeonlan) module sends magic Wake-on-LAN (WoL) broadcast packets.

For non-Windows targets, use the M(community.general.wakeonlan) module instead.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
  community.windows.win_wakeonlan:
    mac: 00:00:5E:00:53:66
    broadcast: 192.0.2.23
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send a magic Wake-On-LAN packet on port 9 to 00-00-5E-00-53-66
  community.windows.win_wakeonlan:
    mac: 00-00-5E-00-53-66
    port: 9
  delegate_to: remote_system

Inputs

    
mac:
    description:
    - MAC address to send Wake-on-LAN broadcast packet for.
    required: true
    type: str

port:
    default: 7
    description:
    - UDP port to use for magic Wake-on-LAN packet.
    type: int

broadcast:
    default: 255.255.255.255
    description:
    - Network broadcast address to use for broadcasting magic Wake-on-LAN packet.
    type: str

See also