dellemc-openmanage-ansible-modules icon indicating copy to clipboard operation
dellemc-openmanage-ansible-modules copied to clipboard

[QUESTION]: Module to get all LC jobs

Open markatdxb opened this issue 1 year ago • 1 comments

How can the team help?

Details: ? Hello, is there any module which is able to pull the list of all LC jobs ? thanks

markatdxb avatar Sep 07 '22 08:09 markatdxb

@markatdxb, the idrac_lifecycle_controller_job_status_info module currently supports getting details of a specific job only. Going forward, it can be extended to return all the jobs. Meanwhile, you can make a direct API call using the ansible.builtin.uri module:

  tasks:
  - name: Get the job queue
    ansible.builtin.uri:
      url: "https://{{ inventory_hostname }}/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs?$expand=*($levels=1)"
      user: "root"
      password: "Dell_123"
      validate_certs: False
      force_basic_auth: yes
      method: GET
      headers:
        Accept: "application/json"
        OData-Version: "4.0"
      status_code: 200
    register: job_queue_response

anupamaloke avatar Sep 15 '22 13:09 anupamaloke