Skip to content

Instantly share code, notes, and snippets.

@logankimmel
Created March 31, 2015 14:57
Show Gist options
  • Save logankimmel/36499e46e0246d75e44e to your computer and use it in GitHub Desktop.
Save logankimmel/36499e46e0246d75e44e to your computer and use it in GitHub Desktop.
$esx_hostname = '172.28.4.4'
if ($esx_hostname != undef) and ($force_restart == 'true') {
transport { 'vcenter' :
username => 'root',
password => 'password',
server => $esx_hostname,
options => {
'insucure' => true }
}
esx_maintmode { 'enable' :
ensure => present,
timeout => 0,
transport => Transport['vcenter'],
evacuate_powered_off_vms => true,
host => $esx_hostname
}
file_line { 'create_share' :
path => '/etc/exports',
line => '/var/nfs/firmware/M620Minimum *(ro,sync,no_subtree_check)',
notify => Service['nfs']
}
service { 'nfs' :
ensure => running
}
idrac_fw_installfromuri { 'idrac' :
ensure => present,
force_restart => true,
idrac_firmware => [
{
'instance_id' => 'DCIM:INSTALLED#741__BIOS.Setup.1-1',
'component_id' => 159,
'uri_path' => 'nfs://172.18.4.100/FOLDER01972762M/1/BIOS_R91RV_WN32_2.2.7.EXE;mountpoint=/var/nfs/firmware/ASMMinimum'
},
{
'instance_id' => 'DCIM:INSTALLED#iDRAC.Embedded.1-1#IDRACinfo',
'component_id' => 25227,
'uri_path' => 'nfs://172.18.4.100/ESM_Firmware_V554G_WN32_1.56.55_A00.EXE;mountpoint=/var/nfs/firmware/M620Minimum'
},
{
'instance_id' => 'DCIM:INSTALLED#802__USC.Embedded.1:LC.Embedded.1',
'component_id' => 28897,
'uri_path' => 'nfs://172.18.4.100/Lifecycle-Controller_Application_TNJFT_WN32_1.3.1.13_A00.EXE;mountpoint=/var/nfs/firmware/M620Minimum'
}
],
require => [Esx_maintmode['enable'], File_line['create_share']],
before => Esx_maintmode['disable']
}
esx_maintmode { 'disable' :
ensure => absent,
timeout => 0,
transport => Transport['vcenter'],
host => $esx_hostname,
evacuate_powered_off_vms => true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment