community.general.hpilo_info – Gather information through an HP iLO interface

Note

This plugin is part of the community.general collection (version 4.2.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 community.general.

To use it in a playbook, specify: community.general.hpilo_info.

Synopsis

  • This module gathers information on a specific system using its HP iLO interface. These information includes hardware and network related information useful for provisioning (e.g. macaddress, uuid).

  • This module requires the hpilo python module.

  • This module was called hpilo_facts before Ansible 2.9, returning ansible_facts. Note that the community.general.hpilo_info module no longer returns ansible_facts!

Requirements

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

  • hpilo

Parameters

Parameter Choices/Defaults Comments
host
string / required
The HP iLO hostname/address that is linked to the physical system.
login
string
Default:
"Administrator"
The login name to authenticate to the HP iLO interface.
password
string
Default:
"admin"
The password to authenticate to the HP iLO interface.
ssl_version
string
    Choices:
  • SSLv3
  • SSLv23
  • TLSv1 ←
  • TLSv1_1
  • TLSv1_2
Change the ssl_version used.

Notes

Note

  • This module ought to be run from a system that can access the HP iLO interface directly, either by using local_action or using delegate_to.

Examples

- name: Gather facts from a HP iLO interface only if the system is an HP server
  community.general.hpilo_info:
    host: YOUR_ILO_ADDRESS
    login: YOUR_ILO_LOGIN
    password: YOUR_ILO_PASSWORD
  when: cmdb_hwmodel.startswith('HP ')
  delegate_to: localhost
  register: results

- ansible.builtin.fail:
    msg: 'CMDB serial ({{ cmdb_serialno }}) does not match hardware serial ({{ results.hw_system_serial }}) !'
  when: cmdb_serialno != results.hw_system_serial

Return Values

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

Key Returned Description
host_power_status
string
added in 3.5.0 of community.general
always
Power status of host.
Will be one of ON, OFF and UNKNOWN.

Sample:
True
hw_bios_date
string
always
BIOS date

Sample:
05/05/2011
hw_bios_version
string
always
BIOS version

Sample:
P68
hw_eth_ilo
dictionary
always
Interface information (for the iLO network interface)

Sample:
[{'macaddress': '00:11:22:33:44:BA'}, {'macaddress_dash': '00-11-22-33-44-BA'}]
hw_ethX
dictionary
always
Interface information (for each interface)

Sample:
[{'macaddress': '00:11:22:33:44:55', 'macaddress_dash': '00-11-22-33-44-55'}]
hw_product_name
string
always
Product name

Sample:
ProLiant DL360 G7
hw_product_uuid
string
always
Product UUID

Sample:
ef50bac8-2845-40ff-81d9-675315501dac
hw_system_serial
string
always
System serial number

Sample:
ABC12345D6
hw_uuid
string
always
Hardware UUID

Sample:
123456ABC78901D2


Authors

  • Dag Wieers (@dagwieers)