dellemc.openmanage.idrac_network_info module – Discover network device functions (NICs) on iDRAC

Note

This module is part of the dellemc.openmanage collection (version 11.0.0).

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 dellemc.openmanage. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.openmanage.idrac_network_info.

New in dellemc.openmanage 10.0.0

Synopsis

  • Discover all network device functions (NICs) on an iDRAC via the chassis-scoped Redfish NetworkAdapters endpoint.

  • Returns rich metadata per NIC including ID, link status, MAC address, NIC type, speed capability, and media type.

  • Supports both iDRAC9 (16G) and iDRAC10 (17G) via dynamic URI resolution.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9.6

Parameters

Parameter

Comments

ca_path

path

added in dellemc.openmanage 5.0.0

The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.

cert_fingerprint

string

SHA-256 fingerprint of the expected TLS certificate (hex digest, with or without colons).

When supplied together with validate_certs=false, the module verifies the remote certificate’s fingerprint instead of performing full CA validation.

enforce_validate_certs

boolean

If true and validate_certs is false, the module will fail with an error instead of just emitting a warning.

Choices:

  • false ← (default)

  • true

force_refresh

boolean

Force refresh of NIC discovery results, bypassing the in-memory cache.

Choices:

  • false ← (default)

  • true

idrac_ip

string / required

iDRAC IP Address.

idrac_password

aliases: idrac_pwd

string / required

iDRAC user password.

If the password is not provided, then the environment variable IDRAC_PASSWORD is used.

Example: export IDRAC_PASSWORD=password

idrac_port

integer

iDRAC port.

Default: 443

idrac_user

string / required

iDRAC username.

If the username is not provided, then the environment variable IDRAC_USERNAME is used.

Example: export IDRAC_USERNAME=username

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

validate_certs

boolean

added in dellemc.openmanage 5.0.0

If false, the SSL certificates will not be validated.

Configure false only on personally controlled sites where self-signed certificates are used.

Prior to collection version 5.0.0, the validate_certs is false by default.

Choices:

  • false

  • true ← (default)

Notes

Note

  • Run this module from a system that has direct access to Dell iDRAC.

  • This module supports both IPv4 and IPv6 address for idrac_ip.

  • This module is read-only and always returns changed=false.

Examples

---
- name: Discover all NICs on iDRAC
  dellemc.openmanage.idrac_network_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"

- name: Discover NICs with forced cache refresh
  dellemc.openmanage.idrac_network_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    force_refresh: true

- name: Discover NICs and use results in subsequent tasks
  hosts: idrac_hosts
  tasks:
    - name: Get all NICs
      dellemc.openmanage.idrac_network_info:
        idrac_ip: "{{ idrac_ip }}"
        idrac_user: "{{ idrac_user }}"
        idrac_password: "{{ idrac_password }}"
      register: nic_result

    - name: Display NIC IDs
      ansible.builtin.debug:
        msg: "Found NIC: {{ item.id }}"
      loop: "{{ nic_result.network_device_functions }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

idrac_firmware_version

string

iDRAC firmware version.

Returned: success

Sample: "7.30.30.50"

idrac_generation

integer

PowerEdge server generation (14G-16G for iDRAC9, 17G+ for iDRAC10).

Returned: success

Sample: 16

idrac_model

string

iDRAC model identifier.

Returned: success

Sample: "iDRAC 9"

msg

string

Overall status message.

Returned: always

Sample: "Successfully discovered network device functions."

network_device_functions

list / elements=string

List of network device functions with rich metadata.

Returned: success

Sample: [{"device_description": "Embedded NIC 1 Port 1 Partition 1", "id": "NIC.Embedded.1-1-1", "link_speed": "10000 Mbps", "link_status": "LinkUp", "mac_address": "B0:26:28:E4:95:60", "media_type": "Base-T", "net_dev_func_type": "Ethernet"}]

redfish_error

dictionary

Details of the HTTP Error.

Returned: on HTTP error

Sample: {"error": {"code": "Base.1.0.GeneralError", "message": "A general error has occurred."}}

Authors

  • Mangirish Kenkare(@MangirishK)