---
- hosts: ome
  connection: local
  name: Dell OpenManage Ansible job details.
  gather_facts: False

  collections:
    - dellemc.openmanage

  tasks:
  - name: Get all jobs details.
    ome_job_info:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"

  - name: Get job details for id.
    ome_job_info:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      job_id: 12345

  - name: Get filtered job details.
    ome_job_info:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      system_query_options:
        top: 2
        skip: 1
        filter: "JobType/Id eq 8"