community.general.ipmi_boot module – Management of order of boot devices

Note

This module is part of the community.general collection (version 8.6.7).

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.ipmi_boot.

Synopsis

  • Use this module to manage order of boot devices

Aliases: remote_management.ipmi.ipmi_boot

Requirements

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

  • pyghmi

Parameters

Parameter

Comments

bootdev

string / required

Set boot device to use on next reboot

The choices for the device are: - network – Request network boot - floppy – Boot from floppy - hd – Boot from hard drive - safe – Boot from hard drive, requesting ‘safe mode’ - optical – boot from CD/DVD/BD drive - setup – Boot into setup utility - default – remove any IPMI directed boot device request

Choices:

  • "network"

  • "floppy"

  • "hd"

  • "safe"

  • "optical"

  • "setup"

  • "default"

key

string

added in community.general 4.1.0

Encryption key to connect to the BMC in hex format.

name

string / required

Hostname or ip address of the BMC.

password

string / required

Password to connect to the BMC.

persistent

boolean

If set, ask that system firmware uses this device beyond next boot. Be aware many systems do not honor this.

Choices:

  • false ← (default)

  • true

port

integer

Remote RMCP port.

Default: 623

state

string

Whether to ensure that boot devices is desired.

The choices for the state are: - present – Request system turn on - absent – Request system turn on

Choices:

  • "present" ← (default)

  • "absent"

uefiboot

boolean

If set, request UEFI boot explicitly. Strictly speaking, the spec suggests that if not set, the system should BIOS boot and offers no “don’t care” option. In practice, this flag not being set does not preclude UEFI boot on any system I’ve encountered.

Choices:

  • false ← (default)

  • true

user

string / required

Username to use to connect to the BMC.

Attributes

Attribute

Support

Description

check_mode

Support: full

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.

Examples

- name: Ensure bootdevice is HD
  community.general.ipmi_boot:
    name: test.testdomain.com
    user: admin
    password: password
    bootdev: hd

- name: Ensure bootdevice is not Network
  community.general.ipmi_boot:
    name: test.testdomain.com
    user: admin
    password: password
    key: 1234567890AABBCCDEFF000000EEEE12
    bootdev: network
    state: absent

Return Values

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

Key

Description

bootdev

string

The boot device name which will be used beyond next boot.

Returned: success

Sample: "default"

persistent

boolean

If True, system firmware will use this device beyond next boot.

Returned: success

Sample: false

uefimode

boolean

If True, system firmware will use UEFI boot explicitly beyond next boot.

Returned: success

Sample: false

Authors

  • Bulat Gaifullin (@bgaifullin)