engine: resources: Add simple configuration steps to virt builder
This adds some simplistic configuration management / provisioning functionality to this virt:builder resource which makes it easier to kick off special functionality that we might want to build.
This commit is contained in:
@@ -99,6 +99,11 @@ class vm($name, $config) {
|
||||
}
|
||||
$seeds = $config->seeds || []
|
||||
|
||||
$mkdir = $config->mkdir || []
|
||||
$copy_in = $config->copy_in || []
|
||||
$run_cmd = $config->run_cmd || []
|
||||
$firstboot_cmd = $config->firstboot_cmd || []
|
||||
|
||||
virt:builder "${filename}" {
|
||||
hostname => $name,
|
||||
os_version => "${distro}-${version}",
|
||||
@@ -118,6 +123,11 @@ class vm($name, $config) {
|
||||
root_password_selector => $root_password_selector,
|
||||
seeds => $seeds,
|
||||
|
||||
mkdir => $mkdir,
|
||||
copy_in => $copy_in,
|
||||
run_cmd => $run_cmd,
|
||||
firstboot_cmd => $firstboot_cmd,
|
||||
|
||||
# make sure key exists so that's it's available for injection!
|
||||
Depend => File["/root/.ssh/id_rsa"],
|
||||
Depend => Svc["virtqemud"],
|
||||
|
||||
Reference in New Issue
Block a user