initial commit
This commit is contained in:
12
tcl/config/json_racklist
Normal file
12
tcl/config/json_racklist
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/tclsh
|
||||
source config/rack.list
|
||||
set result [list]
|
||||
foreach {rack nodes} $racklist {
|
||||
catch {
|
||||
lassign [split [dict get $nodes _cc] :] host
|
||||
lappend result "\"$rack\": \"$host\""
|
||||
}
|
||||
}
|
||||
set sep {,
|
||||
}
|
||||
puts stdout "{\n [join $result $sep]\n}"
|
||||
Reference in New Issue
Block a user