Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_job_queue/molecule/negative_scenarios-10646/converge.yml

raw symbols SCIP
1 ---
2 - name: Negative Scenarios
3 hosts: all
4 gather_facts: false
5 tasks:
6 - name: Creating a job
7 ansible.builtin.include_tasks:
8 file: ../_create_job.yml
9
10 - name: Deleting a job
11 block:
12 - name: Delete a job from the job queue with an invalid id
13 ansible.builtin.import_role:
14 name: "idrac_job_queue"
15 vars:
16 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
17 username: "{{ lookup('env', 'IDRAC_USER') }}"
18 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
19 validate_certs: false
20 job_id: JID_12345678
21 rescue:
22 - name: "Verifying invalid job deletion from the job queue"
23 ansible.builtin.assert:
24 that:
25 - idrac_job_queue_out.msg == "The job JID_12345678 is invalid."
26
27 - name: Clear job queue for invalid hostname
28 block:
29 - name: Clearing job queue with an invalid hostname
30 ansible.builtin.import_role:
31 name: idrac_job_queue
32 vars:
33 hostname: "invalidHostname"
34 username: "{{ lookup('env', 'IDRAC_USER') }}"
35 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
36 clear_job_queue: true
37 validate_certs: false
38
39 rescue:
40 - name: "Verifying job queue clear with an invalid hostname"
41 ansible.builtin.assert:
42 that:
43 - "'<urlopen error [Errno -2] Name or service not known>' in idrac_job_queue_out.msg or
44 '<urlopen error [Errno -3] Temporary failure in name resolution>' in idrac_job_queue_out.msg"
45
46 - name: Clear job queue for invalid username
47 block:
48 - name: Clearing job queue with an invalid username
49 ansible.builtin.import_role:
50 name: idrac_job_queue
51 vars:
52 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
53 username: "invalidUsername"
54 password: "{{ lookup('env', 'IDRAC_PASSWORD') }}"
55 clear_job_queue: true
56 validate_certs: false
57
58 rescue:
59 - name: "Verifying job queue clear with an invalid username"
60 ansible.builtin.assert:
61 that:
62 - "'The authentication credentials included with this request are missing or invalid.' in idrac_job_queue_out.msg"
63
64 - name: Clear job queue for invalid password
65 block:
66 - name: Clearing job queue with an invalid password
67 ansible.builtin.import_role:
68 name: idrac_job_queue
69 vars:
70 hostname: "{{ lookup('env', 'IDRAC_IP') }}"
71 username: "{{ lookup('env', 'IDRAC_USER') }}"
72 password: "invalidPassword"
73 clear_job_queue: true
74 validate_certs: false
75
76 rescue:
77 - name: "Verifying job queue clear with an invalid password"
78 ansible.builtin.assert:
79 that:
80 - "'The authentication credentials included with this request are missing or invalid.' in idrac_job_queue_out.msg"