diff --git a/pkg/hardware/mac.go b/pkg/hardware/mac.go index 1509e3a..856b8d0 100644 --- a/pkg/hardware/mac.go +++ b/pkg/hardware/mac.go @@ -12,10 +12,11 @@ import ( ) type Host struct { - MAC string `json:"mac"` - Hostname string `json:"hostname"` - IP string `json:"ip"` - Booted string `json:"booted"` + MAC string `json:"mac"` + Hostname string `json:"hostname"` + IP string `json:"ip"` + Booted string `json:"booted"` + IgnitionFile string `json:"ignitionFile",omitempty` } type BootyData struct { diff --git a/pkg/http/request.go b/pkg/http/request.go index ffd90da..b9be505 100644 --- a/pkg/http/request.go +++ b/pkg/http/request.go @@ -141,7 +141,12 @@ WantedBy=default.target`, JoinString: viper.GetString(config.JoinString), ServerIP: viper.GetString(config.ServerIP), } - t, err := template.ParseFiles(fmt.Sprintf("%s/%s", viper.GetString(config.DataDir), viper.GetString(config.IgnitionFile))) + + ignitionFile := viper.GetString(config.IgnitionFile) + if host.IgnitionFile != "" { + ignitionFile = host.IgnitionFile + } + t, err := template.ParseFiles(fmt.Sprintf("%s/%s", viper.GetString(config.DataDir), ignitionFile)) if err != nil { w.Write([]byte(err.Error())) return diff --git a/web/src/views/HostsView.vue b/web/src/views/HostsView.vue index d21713e..80f0ae4 100644 --- a/web/src/views/HostsView.vue +++ b/web/src/views/HostsView.vue @@ -75,11 +75,15 @@ export default { +
- {{mac}} + {{mac}} {{host.hostname}} - + + + {{host.ignitionFile}} + @@ -94,11 +98,15 @@ export default { +
- {{mac}} + {{mac}} {{host.hostname}} - + + + {{host.ignitionFile}} +