|
|
|
@ -38,8 +38,24 @@ var subCmdHostsList = subCmd{ |
|
|
|
|
return fmt.Errorf("retrieving hosts from garage: %w", err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
hosts := make([]bootstrap.Host, 0, len(hostsMap)) |
|
|
|
|
for _, host := range hostsMap { |
|
|
|
|
type host struct { |
|
|
|
|
Name string `yaml:"name"` |
|
|
|
|
Nebula struct { |
|
|
|
|
IP string `yaml:"ip"` |
|
|
|
|
} `yaml:"nebula"` |
|
|
|
|
Garage bootstrap.GarageHost `yaml:"garage,omitempty"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
hosts := make([]host, 0, len(hostsMap)) |
|
|
|
|
for _, h := range hostsMap { |
|
|
|
|
|
|
|
|
|
host := host{ |
|
|
|
|
Name: h.Name, |
|
|
|
|
Garage: h.Garage, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
host.Nebula.IP = h.IP().String() |
|
|
|
|
|
|
|
|
|
hosts = append(hosts, host) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|