Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
7788dea2
Commit
7788dea2
authored
Oct 10, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1268 from dagwieers/hpilo-reboot-fix
Workaround for when HP iLO is in a state it won't accept requests
parents
d855b4bc
790ed81b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
library/hpilo_boot
+10
-17
No files found.
library/hpilo_boot
View file @
7788dea2
...
@@ -24,8 +24,8 @@ author: Dag Wieers
...
@@ -24,8 +24,8 @@ author: Dag Wieers
module: hpilo_boot
module: hpilo_boot
short_description: Boot system using specific media through HP iLO interface
short_description: Boot system using specific media through HP iLO interface
description:
description:
-
'
This module boots a system through its HP iLO interface. The boot media
-
"
This module boots a system through its HP iLO interface. The boot media
can be one of: cdrom, floppy, hdd, network or usb.
'
can be one of: cdrom, floppy, hdd, network or usb.
"
- This module requires the hpilo python module.
- This module requires the hpilo python module.
version_added: "0.8"
version_added: "0.8"
options:
options:
...
@@ -36,23 +36,19 @@ options:
...
@@ -36,23 +36,19 @@ options:
login:
login:
description:
description:
- The login name to authenticate to the HP iLO interface.
- The login name to authenticate to the HP iLO interface.
required: false
default: Administrator
default: Administrator
password:
password:
description:
description:
- The password to authenticate to the HP iLO interface.
- The password to authenticate to the HP iLO interface.
required: false
default: admin
default: admin
match:
match:
description:
description:
- An optional string to match against the iLO server name.
- An optional string to match against the iLO server name.
- This is a safety measure to prevent accidentally using the wrong
- This is a safety measure to prevent accidentally using the wrong
HP iLO interface with dire consequences.
HP iLO interface with dire consequences.
required: false
media:
media:
description:
description:
- The boot media to boot the system from
- The boot media to boot the system from
required: false
default: network
default: network
choices: [ "cdrom", "floppy", "hdd", "network", "normal", "usb" ]
choices: [ "cdrom", "floppy", "hdd", "network", "normal", "usb" ]
image:
image:
...
@@ -62,7 +58,6 @@ options:
...
@@ -62,7 +58,6 @@ options:
- protocol is either C(http) or C(https)
- protocol is either C(http) or C(https)
- "username:password is optional"
- "username:password is optional"
- port is optional
- port is optional
required: false
state:
state:
description:
description:
- The state of the boot media.
- The state of the boot media.
...
@@ -71,25 +66,23 @@ options:
...
@@ -71,25 +66,23 @@ options:
- "boot_always: Boot from the device each time the serveris rebooted"
- "boot_always: Boot from the device each time the serveris rebooted"
- "connect: Connect the virtual media device and set to boot_always"
- "connect: Connect the virtual media device and set to boot_always"
- "disconnect: Disconnects the virtual media device and set to no_boot"
- "disconnect: Disconnects the virtual media device and set to no_boot"
required: true
default: boot_once
default: boot_once
choices: [ "boot_always", "boot_once", "connect", "disconnect", "no_boot" ]
choices: [ "boot_always", "boot_once", "connect", "disconnect", "no_boot" ]
force:
force:
description:
description:
- Whether to force a reboot (even when the system is already booted)
- Whether to force a reboot (even when the system is already booted)
required: false
default: no
default: no
choices: [ "yes", "no" ]
choices: [ "yes", "no" ]
examples:
examples:
- code: |
- description: Task to boot a system using an ISO from an HP iLO interface only if the system is an HP server
code: |
local_action: hpilo_boot host=$ilo_address login=$ilo_login password=$ilo_password match=$inventory_hostname_short media=cdrom image=$iso_url
local_action: hpilo_boot host=$ilo_address login=$ilo_login password=$ilo_password match=$inventory_hostname_short media=cdrom image=$iso_url
only_if: "'$cmdb_hwmodel'.startswith('HP ')
only_if: "'$cmdb_hwmodel'.startswith('HP ')
description: Task to boot a system using an ISO from an HP iLO interface only if the system is an HP server
notes:
notes:
- To use a USB key image you need to specify floppy as boot media.
- 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
- This module ought to be run from a system that can access the HP iLO
interface directly, either by using C(local_action) or
interface directly, either by using C(local_action) or
C(using delegate)_to
.
using C(delegate_to)
.
'''
'''
import
sys
import
sys
...
@@ -141,11 +134,11 @@ def main():
...
@@ -141,11 +134,11 @@ def main():
if
media
:
if
media
:
### FIXME: In the below case iLO fails for a short period of time due to the server rebooting
# Workaround for: Error communicating with iLO: Problem manipulating EV
# File "/usr/lib/python2.6/site-packages/hpilo.py", line 381, in _parse_message
try
:
# raise IloError("Error communicating with iLO: %s" % child.get('MESSAGE')
)
ilo
.
set_one_time_boot
(
media
)
#hpilo.IloError: Error communicating with iLO: Problem manipulating EV
except
hpilo
.
IloError
:
time
.
sleep
(
60
)
ilo
.
set_one_time_boot
(
media
)
ilo
.
set_one_time_boot
(
media
)
# TODO: Verify if image URL exists/works
# TODO: Verify if image URL exists/works
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment