added template for nodes without bmc
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
f53ae48ae6
commit
b422fd8de2
@@ -166,6 +166,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
### Changed
|
||||
|
||||
- `wwctl container list` only lists names by default. (`--long` shows all attributes.) #1117
|
||||
- use templating mechanism for power commands
|
||||
|
||||
## v4.5.5, 2024-07-05
|
||||
|
||||
|
||||
12
lib/warewulf/bmc/nobmc.tmpl
Normal file
12
lib/warewulf/bmc/nobmc.tmpl
Normal file
@@ -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 }}
|
||||
Reference in New Issue
Block a user