-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added template for nodes without bmc
Signed-off-by: Christian Goll <cgoll@suse.com>
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{{/* used command to access nodes without bmc*/}} | ||
{{- $cmd := "echo command not found" }} | ||
{{- if eq .Cmd "PowerOn" }} {{ $cmd = printf "wol %s" .Interface }} {{ end }} | ||
{{- if eq .Cmd "PowerOff" }} {{ $cmd = printf "ssh %s echo o > /proc/sysrq-trigger" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "PowerCycle" }} {{ $cmd = printf "ssh %s echo r > /proc/sysrq-trigger" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "PowerRest" }} {{ $cmd = printf "ssh %s echo r > /proc/sysrq-trigger" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "PowerSoft" }} {{ $cmd = print "ssh %s reboot" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "PowerStatus" }} {{ $args = "ping -c 1 %s &> /dev/null %s && echo ON || echo OFF" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "SDRList" }} {{ $cmd = print "ssh %s sensors" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "SensorList" }} {{ $cmd = print "ssh %s sensors" .Ipaddr }} {{ end }} | ||
{{- if eq .Cmd "Console" }} {{ $args = "echo node sol" }} {{ end }} | ||
{{ $cmd }} |