khuedoan-homelab/metal/roles/wake/tasks/main.yml

12 lines
296 B
YAML
Raw Normal View History

2021-03-03 01:25:56 +07:00
- name: Send magic Wake-on-LAN packet
community.general.wakeonlan:
mac: "{{ hostvars[inventory_hostname]['mac'] }}"
delegate_to: localhost
- name: Wait for the servers to comes up
wait_for:
host: '{{ ansible_host }}'
port: 22
search_regex: OpenSSH
delegate_to: localhost