community.general.hpilo_info module – Gather information through an HP iLO interface
Note
This module is part of the community.general collection (version 10.1.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
.
You need further requirements to be able to use this module,
see Requirements for details.
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.
Requirements
The below requirements are needed on the host that executes this module.
hpilo
Parameters
Parameter |
Comments |
---|---|
The HP iLO hostname/address that is linked to the physical system. |
|
The login name to authenticate to the HP iLO interface. Default: |
|
The password to authenticate to the HP iLO interface. Default: |
|
Change the ssl_version used. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
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 usingdelegate_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 |
Description |
---|---|
Power status of host. Will be one of Returned: always Sample: |
|
BIOS date Returned: always Sample: |
|
BIOS version Returned: always Sample: |
|
Interface information (for the iLO network interface) Returned: always Sample: |
|
Interface information (for each interface) Returned: always Sample: |
|
Product name Returned: always Sample: |
|
Product UUID Returned: always Sample: |
|
System serial number Returned: always Sample: |
|
Hardware UUID Returned: always Sample: |