Debian Codegraph @

ansible_collections/dellemc/openmanage/roles/idrac_job_queue/tasks/main.yml

raw symbols SCIP
1 ---
2 # tasks file for idrac_job_queue
3 - name: Check whether atleast one of 'IDRAC_USERNAME' or username is provided
4 ansible.builtin.fail:
5 msg: "Ensure the value for environment variable 'IDRAC_USERNAME' or
6 the argument 'username' is set."
7 when: username is not defined and not lookup('env', 'IDRAC_USERNAME')
8
9 - name: Check whether atleast one of 'IDRAC_PASSWORD' or password is provided
10 ansible.builtin.fail:
11 msg: "Ensure the value for environment variable 'IDRAC_PASSWORD' or
12 the argument 'password' is set."
13 when: password is not defined and not lookup('env', 'IDRAC_PASSWORD')
14
15 - name: Running idrac job queue role
16 when: (job_id is defined and job_id != "") or
17 (clear_job_queue is true)
18 block:
19 - name: Validate the inputs
20 ansible.builtin.include_tasks: validate_input_data.yml
21
22 - name: Delete job operation
23 ansible.builtin.include_tasks: delete_job_with_id.yml
24 when:
25 - job_id is defined and job_id != ""
26 - clear_job_queue is false
27
28 - name: Checking iDRAC version
29 ansible.builtin.include_tasks: get_server_generation.yml
30
31 - name: Clear Job queue operation
32 when: clear_job_queue is true
33 block:
34 - name: Check firmware version
35 ansible.builtin.include_tasks: get_idrac_firmware_version.yml
36
37 - name: Clear job queue operation using rest
38 ansible.builtin.include_tasks: clear_jobs_with_api.yml
39 when: (model|int) >=14
40
41 - name: Clear job queue operation for wsman
42 ansible.builtin.include_tasks: clear_jobs_with_wsman.yml
43 when:
44 - (model|int) <= 13
45
46 rescue:
47 - name: Set the failure messages
48 ansible.builtin.set_fact:
49 idrac_job_queue_out: "{{ ansible_failed_result
50 | combine({'failed_task_name': ansible_failed_task.name}) }}"
51
52 always:
53 - name: Print the message
54 when: idrac_job_queue_out is defined
55 failed_when: idrac_job_queue_out.failed is defined
56 and idrac_job_queue_out.failed is true
57 ansible.builtin.debug:
58 var: idrac_job_queue_out