fix 🐛: Fix issue with multiple interfaces and MAC addresses
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s
This fix targets the first element in the list to resolve issues related to multiple interfaces and MAC addresses.
This commit is contained in:
@@ -118,14 +118,14 @@
|
|||||||
|
|
||||||
- name: Start tcpdump to capture WOL packet
|
- name: Start tcpdump to capture WOL packet
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
timeout 10 tcpdump -i {{ en_interfaces }} -nn -c 1 udp port {{ wol_port }}
|
timeout 10 tcpdump -i {{ en_interfaces[0] }} -nn -c 1 udp port {{ wol_port }}
|
||||||
register: tcpdump_result
|
register: tcpdump_result
|
||||||
async: 12
|
async: 12
|
||||||
poll: 0
|
poll: 0
|
||||||
|
|
||||||
- name: Send Wake-on-LAN packet from localhost
|
- name: Send Wake-on-LAN packet from localhost
|
||||||
ansible.builtin.wakeonlan:
|
ansible.builtin.wakeonlan:
|
||||||
mac: "{{ wol_mac_addresses }}"
|
mac: "{{ wol_mac_addresses[0] }}"
|
||||||
port: "{{ wol_port }}"
|
port: "{{ wol_port }}"
|
||||||
broadcast: 255.255.255.255
|
broadcast: 255.255.255.255
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
|||||||
Reference in New Issue
Block a user