* (#1) If the remote_access for a channel is set to 'off', the ressource disable it.

This commit is contained in:
gardouille 2015-02-09 11:43:13 +01:00
parent 9f4b476a87
commit 7a308c164e
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,12 @@
---------------------------------------
###
##### Changes
* (#1) If the remote_access for a channel is set to 'off', the ressource disable it.
---------------------------------------
### 0.1.1 - 2015/01/20
Minor release to correct some mistakes.

View File

@ -45,8 +45,11 @@ define ipmi::ressource::channel ( $channel_id = $title, $ipaddr = '0.0.0.0', $ne
->
# Enable remote access
exec { "IPMI set remote access to ${remote_access} for channel ${channel_id}":
command => "ipmitool -I open lan set ${channel_id} access ${remote_access}",
onlyif => "ipmitool -I open channel info ${channel_id} | grep -i 'Access Mode .* disable'",
command => "ipmitool -I open lan set ${channel_id} access ${remote_access}",
onlyif => $remote_access ? {
'off' => "ipmitool -I open channel info ${channel_id} | grep -i 'Access Mode .* available'",
default => "ipmitool -I open channel info ${channel_id} | grep -i 'Access Mode .* disable'",
},
}
} # Public ressource: ipmi::ressource::channel