community.general.hpilo_boot module – Boot system using specific media through HP iLO interface

Note

This module is part of the community.general collection (version 9.5.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_boot.

Synopsis

  • This module boots a system through its HP iLO interface. The boot media can be one of: cdrom, floppy, hdd, network or usb.

  • This module requires the hpilo python module.

Requirements

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

  • python-hpilo

Parameters

Parameter

Comments

force

boolean

Whether to force a reboot (even when the system is already booted).

As a safeguard, without force, hpilo_boot will refuse to reboot a server that is already running.

Choices:

  • false ← (default)

  • true

host

string / required

The HP iLO hostname/address that is linked to the physical system.

image

string

The URL of a cdrom, floppy or usb boot media image. protocol://username:password@hostname:port/filename

protocol is either ‘http’ or ‘https’

username:password is optional

port is optional

login

string

The login name to authenticate to the HP iLO interface.

Default: "Administrator"

media

string

The boot media to boot the system from

Choices:

  • "cdrom"

  • "floppy"

  • "rbsu"

  • "hdd"

  • "network"

  • "normal"

  • "usb"

password

string

The password to authenticate to the HP iLO interface.

Default: "admin"

ssl_version

string

Change the ssl_version used.

Choices:

  • "SSLv3"

  • "SSLv23"

  • "TLSv1" ← (default)

  • "TLSv1_1"

  • "TLSv1_2"

state

string

The state of the boot media.

no_boot: Do not boot from the device

boot_once: Boot from the device once and then notthereafter

boot_always: Boot from the device each time the server is rebooted

connect: Connect the virtual media device and set to boot_always

disconnect: Disconnects the virtual media device and set to no_boot

poweroff: Power off the server

Choices:

  • "boot_always"

  • "boot_once" ← (default)

  • "connect"

  • "disconnect"

  • "no_boot"

  • "poweroff"

Attributes

Attribute

Support

Description

check_mode

Support: none

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

  • To use a USB key image you need to specify floppy as boot media.

  • 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: Task to boot a system using an ISO from an HP iLO interface only if the system is an HP server
  community.general.hpilo_boot:
    host: YOUR_ILO_ADDRESS
    login: YOUR_ILO_LOGIN
    password: YOUR_ILO_PASSWORD
    media: cdrom
    image: http://some-web-server/iso/boot.iso
  when: cmdb_hwmodel.startswith('HP ')
  delegate_to: localhost

- name: Power off a server
  community.general.hpilo_boot:
    host: YOUR_ILO_HOST
    login: YOUR_ILO_LOGIN
    password: YOUR_ILO_PASSWORD
    state: poweroff
  delegate_to: localhost

Authors

  • Dag Wieers (@dagwieers)