Manage Dell DRAC.
New in version 2015.8.2.
Change user's password
CLI Example:
salt dell dracr.change_password [USERNAME] [PASSWORD] uid=[OPTIONAL]
host=<remote DRAC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.change_password diana secret
Note that if only a username is specified then this module will look up details for all 16 possible DRAC users. This is time consuming, but might be necessary if one is not sure which user slot contains the one you want. Many late-model Dell chassis have 'root' as UID 1, so if you can depend on that then setting the password is much quicker. Raises an error if the supplied password is greater than 20 chars.
Create user accounts
CLI Example:
salt dell dracr.create_user [USERNAME] [PASSWORD] [PRIVILEGES]
salt dell dracr.create_user diana secret login,test_alerts,clear_logs
login : Login to iDRAC
drac : Configure iDRAC
user_management : Configure Users
clear_logs : Clear Logs
server_control_commands : Execute Server Control Commands
console_redirection : Access Console Redirection
virtual_media : Access Virtual Media
test_alerts : Test Alerts
debug_commands : Execute Debug Commands
Delete a user
CLI Example:
salt dell dracr.delete_user [USERNAME] [UID - optional]
salt dell dracr.delete_user diana 4
Change the QuickDeploy password, used for switches as well
CLI Example:
salt dell dracr.deploy_password [USERNAME] [PASSWORD]
host=<remote DRAC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.change_password diana secret
Note that if only a username is specified then this module will look up details for all 16 possible DRAC users. This is time consuming, but might be necessary if one is not sure which user slot contains the one you want. Many late-model Dell chassis have 'root' as UID 1, so if you can depend on that then setting the password is much quicker.
Change the QuickDeploy SNMP community string, used for switches as well
CLI Example:
salt dell dracr.deploy_snmp SNMP_STRING
host=<remote DRAC or CMC> admin_username=<DRAC user>
admin_password=<DRAC PW>
salt dell dracr.deploy_password diana secret
Enable/Disable email alerts
CLI Example:
salt dell dracr.email_alerts True
salt dell dracr.email_alerts False
Get the datacenter of the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_chassis_location host=111.222.333.444
admin_username=root admin_password=secret
Get the location of the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_chassis_location host=111.222.333.444
admin_username=root admin_password=secret
Get the name of a chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.get_chassis_name host=111.222.333.444
admin_username=root admin_password=secret
Get the name of a slot number in the chassis.
The number of the slot for which to obtain the name.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt-call --local dracr.get_slotname 0 host=111.222.333.444
admin_username=root admin_password=secret
Run a generic racadm command against a particular blade in a chassis. Blades are usually named things like 'server-1', 'server-2', etc. If the iDRAC has a different password than the CMC, then you can pass it with the idrac_password kwarg.
blade_name -- Name of the blade to run the command on
command -- Command like to pass to racadm
idrac_password -- Password for the iDRAC if different from the CMC
host -- Chassis hostname
admin_username -- CMC username
admin_password -- CMC password
stdout if the retcode is 0, otherwise a standard cmd.run_all dictionary
CLI Example:
salt fx2 chassis.cmd idrac_general server-1 'get BIOS.SysProfileSettings'
List the names of all slots in the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt-call --local dracr.list_slotnames host=111.222.333.444
admin_username=root admin_password=secret
List all DRAC users
CLI Example:
salt dell dracr.list_users
Configure the nameservers on the DRAC
CLI Example:
salt dell dracr.nameservers [NAMESERVERS]
salt dell dracr.nameservers ns1.example.com ns2.example.com
admin_username=root admin_password=calvin module=server-1
host=192.168.1.1
Return Network Configuration
CLI Example:
salt dell dracr.network_info
Performs a reset (reboot) operation on the managed server.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
The element to hard reset on the chassis such as a blade. If not provided, the chassis will be reset.
CLI Example:
salt dell dracr.server_hardreset
salt dell dracr.server_hardreset module=server-1
One of 'powerup', 'powerdown', 'powercycle', 'hardreset', 'graceshutdown'
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
The element to reboot on the chassis such as a blade. If not provided, the chassis will be rebooted.
CLI Example:
salt dell dracr.server_reboot
salt dell dracr.server_reboot module=server-1
Powers down the managed server.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
The element to power off on the chassis such as a blade. If not provided, the chassis will be powered off.
CLI Example:
salt dell dracr.server_poweroff
salt dell dracr.server_poweroff module=server-1
Powers up the managed server.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
The element to power on located on the chassis such as a blade. If not provided, the chassis will be powered on.
CLI Example:
salt dell dracr.server_poweron
salt dell dracr.server_poweron module=server-1
return the power status for the passed module
CLI Example:
salt dell drac.server_powerstatus
Configure server to PXE perform a one off PXE boot
CLI Example:
salt dell dracr.server_pxe
Issues a power-cycle operation on the managed server. This action is similar to pressing the power button on the system's front panel to power down and then power up the system.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
The element to reboot on the chassis such as a blade. If not provided, the chassis will be rebooted.
CLI Example:
salt dell dracr.server_reboot
salt dell dracr.server_reboot module=server-1
Set the location of the chassis.
The name of the datacenter to be set on the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_chassis_datacenter datacenter-name host=111.222.333.444
admin_username=root admin_password=secret
Set the location of the chassis.
The name of the location to be set on the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_chassis_location location-name host=111.222.333.444
admin_username=root admin_password=secret
Set the name of the chassis.
The name to be set on the chassis.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_chassis_name my-chassis host=111.222.333.444
admin_username=root admin_password=secret
Configure Network on the CMC or individual iDRAC.
Use set_niccfg
for blade and switch addresses.
CLI Example:
salt dell dracr.set_network [DRAC IP] [NETMASK] [GATEWAY]
salt dell dracr.set_network 192.168.0.2 255.255.255.0 192.168.0.1
admin_username=root admin_password=calvin host=192.168.1.1
Configure users permissions
CLI Example:
salt dell dracr.set_permissions [USERNAME] [PRIVILEGES]
[USER INDEX - optional]
salt dell dracr.set_permissions diana login,test_alerts,clear_logs 4
login : Login to iDRAC
drac : Configure iDRAC
user_management : Configure Users
clear_logs : Clear Logs
server_control_commands : Execute Server Control Commands
console_redirection : Access Console Redirection
virtual_media : Access Virtual Media
test_alerts : Test Alerts
debug_commands : Execute Debug Commands
Set the name of a slot in a chassis.
The slot number to change.
The name to set. Can only be 15 characters long.
The chassis host.
The username used to access the chassis.
The password used to access the chassis.
CLI Example:
salt '*' dracr.set_slotname 2 my-slotname host=111.222.333.444
admin_username=root admin_password=secret
Configure CMC or individual iDRAC SNMP community string.
Use deploy_snmp
for configuring chassis switch SNMP.
CLI Example:
salt dell dracr.set_snmp [COMMUNITY]
salt dell dracr.set_snmp public
Configure syslog remote logging, by default syslog will automatically be enabled if a server is specified. However, if you want to disable syslog you will need to specify a server followed by False
CLI Example:
salt dell dracr.syslog [SYSLOG IP] [ENABLE/DISABLE]
salt dell dracr.syslog 0.0.0.0 False
Return System information
CLI Example:
salt dell dracr.system_info
Updates firmware using local firmware file
salt dell dracr.update_firmware firmware.exe
This executes the following command on your FX2 (using username and password stored in the pillar data)
racadm update –f firmware.exe -u user –p pass
Executes the following for CIFS (using username and password stored in the pillar data)
racadm update -f <updatefile> -u user –p pass -l //IP-Address/share
Or for NFS (using username and password stored in the pillar data)
racadm update -f <updatefile> -u user –p pass -l IP-address:/share
Salt command for CIFS:
salt dell dracr.update_firmware_nfs_or_cifs firmware.exe //IP-Address/share
Salt command for NFS:
salt dell dracr.update_firmware_nfs_or_cifs firmware.exe IP-address:/share