Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/wakeonlan/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # Copyright (c) Ansible Project
8 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
9 # SPDX-License-Identifier: GPL-3.0-or-later
10
11 - name: Send a magic Wake-on-LAN packet to 00:00:5E:00:53:66
12 wakeonlan:
13 mac: 00:00:5E:00:53:66
14 broadcast: 192.0.2.255
15
16 - name: Send a magic Wake-on-LAN packet on port 9 to 00-00-5E-00-53-66
17 wakeonlan:
18 mac: 00-00-5E-00-53-66
19 port: 9
20
21 - name: Provide an incorrect MAC length
22 wakeonlan:
23 mac: 00-00-5E-00-53-66-AB
24 port: 9
25 ignore_errors: true
26 register: incorrect_mac_length
27
28 - name: Check error message
29 assert:
30 that:
31 - incorrect_mac_length is failed
32 - incorrect_mac_length.msg is search('Incorrect MAC address length')
33
34 - name: Provide an incorrect MAC format
35 wakeonlan:
36 mac: ZW-YX-WV-UT-SR-QP
37 port: 9
38 ignore_errors: true
39 register: incorrect_mac_format
40
41 - name: Check error message
42 assert:
43 that:
44 - incorrect_mac_format is failed
45 - incorrect_mac_format.msg is search('Incorrect MAC address format')
46
47 - name: Cause a socket error
48 wakeonlan:
49 mac: 00-00-5E-00-53-66
50 broadcast: 345.567.678.890
51 ignore_errors: true
52 register: incorrect_broadcast_address
53
54 - name: Check error message
55 assert:
56 that:
57 - incorrect_broadcast_address is failed
58 - incorrect_broadcast_address.msg is search('not known|Name does not resolve')