dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
339 stars 163 forks source link

[QUESTION]: Module to get all LC jobs #442

Open markatdxb opened 2 years ago

markatdxb commented 2 years ago

How can the team help?

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

anupamaloke commented 2 years ago

@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