Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_boot/molecule/negative_scenarios-10670/converge.yml

raw symbols SCIP
1 ---
2 - name: Play 1 - Negative Scenarios
3 hosts: all
4 gather_facts: false
5 tasks:
6 - name: Play 1 - TC-115436 - Ansible - Role - idrac_boot - Providing wrong
7 hostname
8 ansible.builtin.import_role:
9 name: dellemc.openmanage.idrac_boot
10 vars:
11 hostname: "WrongHostname"
12 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
13 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
14 validate_certs: false
15 boot_source_override_mode: 'uefi'
16 ignore_unreachable: true
17
18 - name: Verify - TC-115436 - Ansible - Role - idrac_boot - Providing wrong
19 hostname
20 ansible.builtin.assert:
21 that:
22 - "'Unable to communicate with iDRAC WrongHostname'
23 in idrac_boot_out.msg"
24
25 - name: TC-115437 - Ansible - Role - idrac_boot - Providing wrong username
26 ansible.builtin.import_role:
27 name: dellemc.openmanage.idrac_boot
28 vars:
29 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
30 username: "wrongUsername"
31 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
32 validate_certs: false
33 boot_source_override_mode: 'uefi'
34 register: idrac_boot_error_reg
35 ignore_errors: true
36
37 - name: Verify - TC-115437 - Ansible - Role - idrac_boot - Providing wrong
38 username
39 ansible.builtin.assert:
40 that:
41 - "'Unable to communicate with iDRAC' in idrac_boot_out.msg"
42
43 - name: TC-115438 - Ansible - Role - idrac_boot - Providing wrong password
44 ansible.builtin.import_role:
45 name: dellemc.openmanage.idrac_boot
46 vars:
47 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
48 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
49 password: "wrongPassword"
50 validate_certs: false
51 boot_source_override_mode: 'uefi'
52 ignore_errors: true
53 ignore_unreachable: true
54 register: idrac_boot_error_reg
55
56 - name: Verify - TC-115438 - Ansible - Role - idrac_boot - Providing wrong
57 password
58 ansible.builtin.assert:
59 that:
60 - "'Unable to communicate with iDRAC' in idrac_boot_out.msg"
61
62 - name: Play 2 - TC-115439 - Ansible - Role - idrac_boot - Providing invalid
63 https_port
64 hosts: all
65 gather_facts: false
66 tasks:
67 - name: TC-115439 - Ansible - Role - idrac_boot - Providing invalid
68 https_port
69 ansible.builtin.import_role:
70 name: dellemc.openmanage.idrac_boot
71 vars:
72 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
73 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
74 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
75 https_port: 999999
76 validate_certs: false
77 boot_source_override_mode: 'uefi'
78 ignore_unreachable: true
79
80 - name: Verify - TC-115439 - Ansible - Role - idrac_boot - Providing invalid
81 https_port
82 ansible.builtin.assert:
83 that:
84 - "'Unable to communicate with iDRAC' in idrac_boot_out.msg"
85
86 - name: Play 3 - TC-115440 - Ansible - Role - idrac_boot - Providing wrong
87 resource_id
88 hosts: all
89 gather_facts: false
90 tasks:
91 - name: TC-115440 - Ansible - Role - idrac_boot - Providing wrong
92 resource_id
93 ansible.builtin.import_role:
94 name: dellemc.openmanage.idrac_boot
95 vars:
96 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
97 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
98 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
99 resource_id: "Invalid.System.ID"
100 validate_certs: false
101 boot_source_override_mode: 'uefi'
102 ignore_errors: true
103 register: idrac_boot_error_reg
104
105 - name: Verify - TC-115440 - Ansible - Role - idrac_boot - Providing wrong
106 resource_id
107 ansible.builtin.assert:
108 that:
109 - "'HTTP Error 404' in idrac_boot_out.msg"
110
111 - name: Play 4 - TC-115441 - Ansible - Role - idrac_boot - Providing wrong
112 ca_path
113 hosts: all
114 gather_facts: false
115 tasks:
116 - name: TC-115441 - Ansible - Role - idrac_boot - Providing wrong ca_path
117 ansible.builtin.import_role:
118 name: dellemc.openmanage.idrac_boot
119 vars:
120 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
121 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
122 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
123 ca_path: "/root/filenotexists.pem"
124 validate_certs: false
125 boot_source_override_mode: 'uefi'
126 ignore_errors: true
127 register: idrac_boot_error_reg
128
129 - name: Verify - TC-115441 - Ansible - Role - idrac_boot - Providing wrong
130 ca_path
131 ansible.builtin.assert:
132 that:
133 - idrac_boot_out.failed # TBD
134
135 - name: Play 5 - TC-115442 - Ansible - Role - idrac_boot - Providing invalid
136 https_timeout
137 hosts: all
138 gather_facts: false
139 tasks:
140 - name: TC-115442 - Ansible - Role - idrac_boot - Providing invalid
141 https_timeout
142 ansible.builtin.import_role:
143 name: dellemc.openmanage.idrac_boot
144 vars:
145 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
146 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
147 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
148 https_timeout: -1000
149 validate_certs: false
150 boot_source_override_mode: 'uefi'
151 ignore_errors: true
152 register: idrac_boot_error_reg
153
154 - name: Verify - TC-115442 - Ansible - Role - idrac_boot - Providing invalid
155 https_timeout
156 ansible.builtin.assert:
157 that:
158 - "'Timeout value out of range' == idrac_boot_out.msg"
159
160 - name: Play 6 - TC-115443 - Ansible - Role - idrac_boot - Providing invalid
161 job_wait_timeout
162 hosts: all
163 gather_facts: false
164 tasks:
165 - name: TC-115443 - Ansible - Role - idrac_boot - Providing invalid
166 job_wait_timeout
167 block:
168 - name: TC-115443 - Ansible - Role - idrac_boot - Providing invalid
169 job_wait_timeout
170 ansible.builtin.import_role:
171 name: dellemc.openmanage.idrac_boot
172 vars:
173 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
174 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
175 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
176 job_wait_timeout: -1000
177 validate_certs: false
178 boot_source_override_mode: 'legacy'
179 register: idrac_boot_error_reg
180 rescue:
181 - name: Verify - TC-115443 - Ansible - Role - idrac_boot - Providing
182 invalid job_wait_timeout
183 ansible.builtin.assert:
184 that:
185 - "'The parameter job_wait_timeout value cannot be negative or
186 zero.' == ansible_failed_result.msg"
187
188 - name: Play 7 - TC-115444 - Ansible - Role - idrac_boot - Validate all the
189 mutually exclusive scenarios
190 hosts: all
191 gather_facts: false
192 tasks:
193 - name: Check 1 - TC-115444 - Entering block
194 block:
195 - name: Check 1 - TC-115444 - mutual exclusivity between
196 boot_option_reference and display_name
197 ansible.builtin.include_role:
198 name: dellemc.openmanage.idrac_boot
199 vars:
200 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
201 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
202 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
203 validate_certs: false
204 boot_options:
205 - display_name: Hard drive C
206 boot_option_reference: NIC.PxeDevice.2-1
207 enabled: true
208 ignore_errors: true
209 register: idrac_boot_error_reg
210 rescue:
211 - name: Verify - Check 1 - TC-115444 - mutual exclusivity between
212 boot_option_reference and display_name
213 ansible.builtin.assert:
214 that:
215 - "'parameters are mutually exclusive' in idrac_boot_out.msg"
216 - "'boot_option_reference' in idrac_boot_out.msg"
217 - "'display_name' in idrac_boot_out.msg"
218 - idrac_boot_out.failed
219
220 - name: Check 2 - TC-115444 - Entering block
221 block:
222 - name: Check 2 - TC-115444 - mutual exclusivity between boot_options
223 and boot_order
224 ansible.builtin.include_role:
225 name: dellemc.openmanage.idrac_boot
226 vars:
227 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
228 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
229 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
230 validate_certs: false
231 boot_options:
232 - display_name: Hard drive C
233 enabled: true
234 boot_order:
235 - Boot0001
236 - Boot0002
237 ignore_errors: true
238 register: idrac_boot_error_reg
239 rescue:
240 - name: Verify - Check 2 - TC-115444 - mutual exclusivity between
241 boot_options and boot_order
242 ansible.builtin.assert:
243 that:
244 - "'parameters are mutually exclusive: boot_options|boot_order'
245 in idrac_boot_out.msg"
246
247 - name: Check 3 - TC-115444 - Entering block
248 block:
249 - name: Check 3 - TC-115444 - mutual exclusivity between boot_options
250 and boot_source_override_mode
251 ansible.builtin.include_role:
252 name: dellemc.openmanage.idrac_boot
253 vars:
254 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
255 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
256 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
257 validate_certs: false
258 boot_options:
259 - display_name: Hard drive C
260 enabled: true
261 boot_source_override_mode: legacy
262 ignore_errors: true
263 register: idrac_boot_error_reg
264 rescue:
265 - name: Verify - Check 3 - TC-115444 - mutual exclusivity between
266 boot_options and boot_source_override_mode
267 ansible.builtin.assert:
268 that:
269 - "'parameters are mutually exclusive:
270 boot_options|boot_source_override_mode' in idrac_boot_out.msg"
271
272 - name: Check 4 - TC-115444 - Entering block
273 block:
274 - name: Check 4 - TC-115444 - mutual exclusivity between boot_options
275 and boot_source_override_enabled
276 ansible.builtin.include_role:
277 name: dellemc.openmanage.idrac_boot
278 vars:
279 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
280 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
281 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
282 validate_certs: false
283 boot_options:
284 - display_name: Hard drive C
285 enabled: true
286 boot_source_override_enabled: once
287 ignore_errors: true
288 register: idrac_boot_error_reg
289 rescue:
290 - name: Verify - Check 4 - TC-115444 - mutual exclusivity between
291 boot_options and boot_source_override_enabled
292 ansible.builtin.assert:
293 that:
294 - "'parameters are mutually exclusive:
295 boot_options|boot_source_override_enabled'
296 in idrac_boot_out.msg"
297
298 - name: Check 5 - TC-115444 - Entering block
299 block:
300 - name: Check 5 - TC-115444 - mutual exclusivity between boot_options
301 and boot_source_override_target
302 ansible.builtin.include_role:
303 name: dellemc.openmanage.idrac_boot
304 vars:
305 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
306 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
307 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
308 validate_certs: false
309 boot_options:
310 - display_name: Hard drive C
311 enabled: true
312 boot_source_override_target: cd
313 ignore_errors: true
314 register: idrac_boot_error_reg
315 rescue:
316 - name: Verify - Check 5 - TC-115444 - mutual exclusivity between
317 boot_options and boot_source_override_target
318 ansible.builtin.assert:
319 that:
320 - "'parameters are mutually exclusive:
321 boot_options|boot_source_override_target'
322 in idrac_boot_out.msg"
323
324 - name: Check 6 - TC-115444 - Entering block
325 block:
326 - name: Check 6 - TC-115444 - mutual exclusivity between boot_options
327 and uefi_target_boot_source_override
328 ansible.builtin.include_role:
329 name: dellemc.openmanage.idrac_boot
330 vars:
331 hostname: "{{ lookup('ansible.builtin.env', 'IDRAC_IP') }}"
332 username: "{{ lookup('ansible.builtin.env', 'IDRAC_USER') }}"
333 password: "{{ lookup('ansible.builtin.env', 'IDRAC_PASSWORD') }}"
334 validate_certs: false
335 boot_options:
336 - display_name: Hard drive C
337 enabled: true
338 uefi_target_boot_source_override:
339 "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)"
340 ignore_errors: true
341 register: idrac_boot_error_reg
342 rescue:
343 - name: Verify - Check 6 - TC-115444 - mutual exclusivity
344 between boot_options and uefi_target_boot_source_override
345 ansible.builtin.assert:
346 that:
347 - "'parameters are mutually exclusive:
348 boot_options|uefi_target_boot_source_override'
349 in idrac_boot_out.msg"