Ansible Redfish module

redfish_facts module
Documentation: https://docs.ansible.com/ansible/latest/modules/redfish_facts_module.html
Git: https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/remote_management/redfish/redfish_facts.py
local: /usr/lib/python2.7/dist-packages/ansible/modules/remote_management/redfish/redfish_facts.py

redfish_utils library
Git: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/redfish_utils.py
local: /usr/lib/python2.7/dist-packages/ansible/module_utils/redfish_utils.py

#!/usr/bin/env ansible-playbook
 
---
- hosts: localhost
  vars:
    baseuri: 10.0.1.10
    user: ADMIN
    password: ADMIN
  tasks:
    - name: Get all Systems informations
      redfish_facts:
        category: Systems
        # category: ["Systems", "Chassis", "Accounts"]
        command: all
        # command: GetNicInventory
        baseuri: "{{ baseuri }}"
        user: "{{ user }}"
        password: "{{ password }}"
    - debug:
        msg: "{{ redfish_facts | to_nice_json }}"

    - name: Get GetCpuInventory
      redfish_facts:
        category: Systems
        command: GetCpuInventory
        baseuri: "{{ baseuri }}"
        user: "{{ user }}"
        password: "{{ password }}"
    - set_fact:
        cpu_model: "{{ redfish_facts.cpu.entries.0.Model }}"
    - debug:
        msg: "{{ cpu_model }}"