#!/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}"
