Fix corrupted .ansible-lint git object
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
This commit is contained in:
@@ -114,3 +114,33 @@
|
||||
Physical Interfaces: {{ en_interfaces | join(', ') }}
|
||||
WOL Mode: {{ wol_mode }}
|
||||
MAC Addresses: {{ wol_mac_addresses | join(', ') }}
|
||||
|
||||
|
||||
- name: Start tcpdump to capture WOL packet
|
||||
ansible.builtin.shell: |
|
||||
timeout 10 tcpdump -i {{ en_interfaces }} -nn -c 1 udp port {{ wol_port }}
|
||||
register: tcpdump_result
|
||||
async: 12
|
||||
poll: 0
|
||||
|
||||
- name: Send Wake-on-LAN packet from localhost
|
||||
ansible.builtin.wakeonlan:
|
||||
mac: "{{ wol_mac_addresses }}"
|
||||
port: "{{ wol_port }}"
|
||||
broadcast: 255.255.255.255
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Wait for tcpdump to finish
|
||||
ansible.builtin.async_status:
|
||||
jid: "{{ tcpdump_result.ansible_job_id }}"
|
||||
register: tcpdump_status
|
||||
until: tcpdump_status.finished
|
||||
retries: 12
|
||||
delay: 1
|
||||
|
||||
- name: Check if WOL packet was received
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "'UDP' in tcpdump_status.stdout"
|
||||
success_msg: "✅ Wake-on-LAN packet received by host"
|
||||
fail_msg: "❌ No Wake-on-LAN packet detected"
|
||||
Reference in New Issue
Block a user