stackhpc.drac
DRAC
This role helps you set up BIOS settings and RAID on Dell computers that have an iDRAC card.
This role makes the changes needed to match the configuration you want, using the Web Services Management (WSMAN) protocol. If there are any changes already waiting to be applied, whether they were confirmed or not, they will be considered and applied along with the new changes you specified. If there are any conflicts between the pending changes and your specified changes, your specified changes will take precedence.
If you set the drac_reboot
option to true
, the system will restart to apply the changes. There might be situations where the settings can’t be applied without rebooting the system at least once. In those cases, the role will fail if you have set the reboot option to false. Since the system might restart (up to 3 times total) to apply the configuration, this role could take some time to finish.
Requirements
This role includes a module called drac
, which depends on the python-dracclient
package version 2.0.0 or higher. You need to have this package installed for the module to work properly.
Role Variables
You can set the following variables for this role:
drac_address
: The IP address used to communicate with the DRAC.
drac_username
: The username for accessing the DRAC.
drac_password
: The password for accessing the DRAC.
drac_bios_config
: A dictionary that maps BIOS settings to their desired values.
drac_raid_config
: A list of virtual disk configurations. Each item should include: name
, raid_level
, span_length
, span_depth
, pdisks
. The pdisks
should be a list containing physical disk IDs.
drac_reboot
: Indicates whether to reboot the system (if necessary) after applying the configuration.
drac_timeout
: The time, in seconds, to wait for pending operations to finish. 0 means to wait indefinitely.
drac_interval
: The time, in seconds, between checks for operation completion.
drac_check_mode
: Whether to run the drac
module in check mode. By default, it uses the global check mode.
drac_result
: Will hold the result of the drac
module.
Dependencies
None
Example Playbook
Here is how you can use this role:
- hosts: dell-servers
roles:
- role: stackhpc.drac
drac_address: 1.2.3.4
drac_username: foo
drac_password: bar
drac_bios_config:
NumLock: 'On'
SysProfile: 'PerfOptimized'
drac_raid_config:
- name: Virtual disk 1
raid_level: 1
span_length: 2
span_depth: 1
pdisks:
- 'Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- 'Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1'
License
BSD
Author Information
- Authors: Mark Goddard & Stig Telfer
- Company: StackHPC Ltd
- Website: https://stackhpc.com
Role to configure the BIOS and RAID on Dell machines with an iDRAC card.
ansible-galaxy install stackhpc.drac