Published: September 06, 2018
Updated: January 07, 2023
Tags: Ansible, iDRAC
2 min read

Controlling DellEMC iDRACs using Ansible

Tested on Ansible version and iDRAC8 firmware version with RHEL7.5

DellEMC + Redfish API

Dell has included Redfish API [1] support for their 12th Gen PowerEdge Servers (and newer) since firmware version and upwards.

With the inclusion of Redfish API in iDRACs, Dell has also developed a python SDK to control and operate DellEMC iDRACs based on Redfish API using their SDK called "OpenManage Python SDK" [2]. Based on the OpenManage Python SDK, Dell has developed Ansible modules utilizing the SDK called "OpenManage Ansible Modules" [3].

Official Support matrix

Official documentation can be found in the project's git repository [4].

Dell OpenManage Python SDK (omsdk) supports Python 2.7 and above and requires Ansible version 2.2 or higher.

The Ansible modules were tested on several OSes by the OpenManage team:

  • RHEL(7.3)
  • SLES 12SP3

The following iDRAC versions are supported:
iDRAC8 - and
iDRAC9 -, and


Before continuing, make sure you have Ansible and Python installed on your Ansible controller.

Installing Dell EMC OpenManage Python SDK

pip install omsdk

Clone the OpenManage Ansible modules git repository and install the modules

git clone
cd Dell-EMC-Ansible-Modules-for-iDRAC

Verifying Compatability

To verify if your iDRACs support Redfish, make a REST API call to Redfish:

Using shell

curl https://<idrac_hostname>/redfish/v1/Sessions -u username:password

If your iDRAC supports Redfish, the response should be similar to the following:

{"@odata.context":"/redfish/v1/$metadata#SessionCollection.SessionCollection","":"/redfish/v1/Sessions","@odata.type":"#SessionCollection.SessionCollection","Description":"Session Collection","Members":[{"":"/redfish/v1/Sessions/25"},{"":"/redfish/v1/Sessions/18"}],"Members@odata.count":2,"Name":"Session Collection"}

If your iDRAC doesn't support Redfish, the response will be "404 - Not Found".

Using Ansible

There is no native module to verify compatibility, but we can use a REST API Ansible module:

- name: Check if you can authenticate with iDRAC
    url: "https://{{ inventory_hostname}}/redfish/v1/Sessions"
    user: "{{ idrac_user }}"
    password: "{{ idrac_pass }}"
    force_basic_auth: yes
    validate_certs: no # Optional

The responses should be exactly as the curl queries.

Supported actions in OpenManage Ansible modules

For a user guide, visit the project's git repository [5].

The following modules are part of the OpenManage ansible modules:

ansible-doc -l | grep -i idrac
dellemc_configure_idrac_eventing          Configures the iDRAC eventing attributes.
dellemc_configure_idrac_network           Configures the iDRAC network attributes.
dellemc_configure_idrac_services          Configures the iDRAC services attributes.
dellemc_configure_idrac_timezone          Configures the iDRAC timezone attributes.
dellemc_configure_idrac_users             Configures the iDRAC users attributes.
dellemc_idrac_lc_attributes               Enable or disable Collect System Inventory on Restart (CSIOR) property for all iDRAC/LC jobs.
dellemc_idrac_reset                       Reset iDRAC.
dellemc_setup_idrac_syslog                syslog parameters


Example of how to invoke power cycle actions with an Ansible task:

- name: Performing Power Action "{{ power_action }}"
    idrac_ip: "{{ inventory_hostname }}" # The iDRAC IP address
    idrac_port: "{{ idrac_port }}" # The iDRAC HTTP/HTTPS port, by default, 443
    idrac_user: "{{ idrac_user }}" # iDRAC user
    idrac_pwd: "{{ idrac_pass }}" # iDRAC user's password
    change_power: "{{ power_action }}" # One of the following actions: 'On','ForceOff','GracefulRestart','GracefulShutdown','PushPowerButton','Nmi'

To see how I use OpenManage Ansible modules in real-world scenarios as part of automation workflow, view my playbook [6].

  1. Redfish API ↩︎

  2. OpenManage Python SDK GitHub Project ↩︎

  3. OpenManage Ansible Modules GitHub Project ↩︎

  4. OpenManage Ansible Modules Installation Guide ↩︎

  5. OpenManage Ansible Modules User Guide ↩︎

  6. Gerrit Code Review - Dell iDRAC patch ↩︎