On this page
community.general.idrac_redfish_info – Gather PowerEdge server information through iDRAC using Redfish APIs
Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.idrac_redfish_info.
Synopsis
- Builds Redfish URIs locally and sends them to remote iDRAC controllers to get information back.
 - For use with Dell EMC iDRAC operations that require Redfish OEM extensions
 - This module was called 
idrac_redfish_factsbefore Ansible 2.9, returningansible_facts. Note that the community.general.idrac_redfish_info module no longer returnsansible_facts! 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| auth_token
        
        string
        
       
        added in 2.3.0 of community.general
         | 
      
        
        Security token for authentication with OOB controller
         | 
     |
| baseuri
        
        string / required
         | 
      
        
        Base URI of iDRAC controller
         | 
     |
| category
        
        string / required
         | 
      
        
        Category to execute on iDRAC controller
         | 
     |
| command
        
        list / elements=string / required
         | 
      
        
        List of commands to execute on iDRAC controller
        
       GetManagerAttributes returns the list of dicts containing iDRAC, LifecycleController and System attributes
        | 
     |
| password
        
        string
         | 
      
        
        Password for authentication with iDRAC controller
         | 
     |
| timeout
        
        integer
         | 
      Default: 
        10
         | 
      
        
        Timeout in seconds for URL requests to OOB controller
         | 
     
| username
        
        string
         | 
      
        
        User for authentication with iDRAC controller
         | 
     
Examples
- name: Get Manager attributes with a default of 20 seconds
  community.general.idrac_redfish_info:
    category: Manager
    command: GetManagerAttributes
    baseuri: "{{ baseuri }}"
    username: "{{ username }}"
    password: "{{ password }}"
    timeout: 20
  register: result
# Examples to display the value of all or a single iDRAC attribute
- name: Store iDRAC attributes as a fact variable
  ansible.builtin.set_fact:
    idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}"
- name: Display all iDRAC attributes
  ansible.builtin.debug:
    var: idrac_attributes
- name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute
  ansible.builtin.debug:
    var: idrac_attributes['Syslog.1.SysLogEnable']
# Examples to display the value of all or a single LifecycleController attribute
- name: Store LifecycleController attributes as a fact variable
  ansible.builtin.set_fact:
    lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}"
- name: Display LifecycleController attributes
  ansible.builtin.debug:
    var: lc_attributes
- name: Display the value of 'CollectSystemInventoryOnRestart' attribute
  ansible.builtin.debug:
    var: lc_attributes['LCAttributes.1.CollectSystemInventoryOnRestart']
# Examples to display the value of all or a single System attribute
- name: Store System attributes as a fact variable
  ansible.builtin.set_fact:
    system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}"
- name: Display System attributes
  ansible.builtin.debug:
    var: system_attributes
- name: Display the value of 'PSRedPolicy'
  ansible.builtin.debug:
    var: system_attributes['ServerPwr.1.PSRedPolicy']
  Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| msg
        
        dictionary
         | 
      always | 
        
        different results depending on task
         Sample:
        
       
        List of Manager attributes
         | 
     
Authors
- Jose Delarosa (@jose-delarosa)
 
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/latest/collections/community/general/idrac_redfish_info_module.html