Allow buiding all the things
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
output_*
|
||||
output/*
|
||||
*.box
|
||||
*.iso
|
||||
.vagrant
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
become: true
|
||||
ansible.builtin.reboot:
|
||||
when: (_update_atomic is changed) or (_update_all is changed)
|
||||
failed_when: false # This module is buggy and can't always understand a reboot
|
||||
|
||||
- name: Wait for reboot to finish
|
||||
ansible.builtin.wait_for_connection:
|
||||
|
||||
@@ -43,7 +43,7 @@ build {
|
||||
post-processor "vagrant" {
|
||||
keep_input_artifact = true
|
||||
compression_level = 9
|
||||
output = "${local.name}.box"
|
||||
output = "output/{{ .Provider }}/${local.name}.box"
|
||||
vagrantfile_template = "vagrant/${var.arch}.rb"
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ source "qemu" "x86_64" {
|
||||
cpu_model = "host"
|
||||
|
||||
qemuargs = [
|
||||
["-chardev", "stdio,id=char0,logfile=serial-output-qemu-${var.arch}-${var.distro}-${var.version},signal=off"],
|
||||
["-serial", "chardev:char0"]
|
||||
#["-chardev", "stdio,id=char0,logfile=serial-output-qemu-${var.arch}-${var.distro}-${var.version},signal=off"],
|
||||
#["-serial", "chardev:char0"]
|
||||
]
|
||||
accelerator = var.qemu_accelerator
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
source "virtualbox-iso" "x86_64" {
|
||||
iso_url = var.iso.url
|
||||
iso_checksum = var.iso.checksum
|
||||
output_directory = "output_virtualbox_${local.name}"
|
||||
output_directory = "output/virtualbox/${local.name}"
|
||||
|
||||
boot_command = var.boot_command
|
||||
shutdown_command = var.shutdown_command
|
||||
@@ -23,7 +23,7 @@ source "virtualbox-iso" "x86_64" {
|
||||
guest_additions_sha256 = "bbabd89b8fff38a257bab039a278f0c4dc4426eff6e4238c1db01edb7284186a"
|
||||
vboxmanage = [
|
||||
["modifyvm", "{{ .Name }}", "--uart1", "0x3F8", "4"],
|
||||
["modifyvm", "{{ .Name }}", "--uartmode1", "file", "serial-output-virtualbox-${var.arch}-${var.distro}-${var.version}"],
|
||||
#["modifyvm", "{{ .Name }}", "--uartmode1", "file", "output/vritualbox/serial-${var.arch}-${var.distro}-${var.version}"],
|
||||
["modifyvm", "{{ .Name }}", "--nat-localhostreachable1", "on"],
|
||||
]
|
||||
|
||||
|
||||
@@ -51,9 +51,16 @@ def get_parser(args, unsupported=set()):
|
||||
def main():
|
||||
# Equivalent of `set -e` in Bash
|
||||
#$RAISE_SUBPROC_ERROR = True
|
||||
for box in g`*.box`:
|
||||
sed -e f's#@@BOX@@#file:///home/greg/src/vms/vms/{box}#' -e f's/@@BOX_NAME@@/{box}/' Vagrantfile.in > Vagrantfile
|
||||
vagrant up --provider virtualbox
|
||||
for box in g`output/**/*.box`:
|
||||
p = pathlib.Path(box)
|
||||
sed -e f's#@@BOX@@#file:///home/greg/src/vms/vms/{box}#' -e f's/@@BOX_NAME@@/{p.name}/' Vagrantfile.in > Vagrantfile
|
||||
if str(p.parent.name) == "virtualbox":
|
||||
vagrant up --provider virtualbox
|
||||
elif str(p.parent.name) == "qemu":
|
||||
vagrant up --provider libvirt
|
||||
else:
|
||||
print(f"Now whatcha wanna go and do that for? {box}")
|
||||
continue
|
||||
vagrant destroy -f
|
||||
rm -rf .vagrant
|
||||
|
||||
|
||||
Reference in New Issue
Block a user