Skip to content

Commit

Permalink
Pass RootDeviceHints from agent-config to agent ISO
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneb committed Jun 29, 2022
1 parent 4c1cb26 commit ace389b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/asset/agent/agentconfig/agent_config.go
Expand Up @@ -166,6 +166,14 @@ func (a *Asset) HostConfigFiles() (HostConfigFileMap, error) {
if len(macs) > 0 {
files[filepath.Join(name, "mac_addresses")] = []byte(strings.Join(macs, ""))
}

rdh, err := yaml.Marshal(host.RootDeviceHints)
if err != nil {
return nil, err
}
if len(rdh) > 0 && string(rdh) != "{}\n" {
files[filepath.Join(name, "root-device-hints.yaml")] = rdh
}
}
return files, nil
}

0 comments on commit ace389b

Please sign in to comment.