engine: resources, modules: virtualization: Add a seeds option

This makes it easier to configure the machine by giving it an automatic
initial setup of an mgmt client.
This commit is contained in:
James Shubin
2025-03-11 00:03:56 -04:00
parent 181aab9c81
commit 219d25b330
2 changed files with 44 additions and 3 deletions

View File

@@ -97,6 +97,7 @@ class vm($name, $config) {
} else { # other distros TODO: add a switch or else if?
[]
}
$seeds = $config->seeds || []
virt:builder "${filename}" {
hostname => $name,
@@ -115,6 +116,7 @@ class vm($name, $config) {
},
],
root_password_selector => $root_password_selector,
seeds => $seeds,
# make sure key exists so that's it's available for injection!
Depend => File["/root/.ssh/id_rsa"],