diff --git a/recipes/alpine/3.17.pkrvars.hcl b/recipes/alpine/3.17.pkrvars.hcl new file mode 100644 index 0000000..20169c1 --- /dev/null +++ b/recipes/alpine/3.17.pkrvars.hcl @@ -0,0 +1,6 @@ +name = "alpine" +version = "3.17.0" +short_version = "3.17" +arch = "x86_64" +source_url = "https://dl-cdn.alpinelinux.org/alpine" +iso_cd_checksum = "8d4d53bd34b2045e1e219b87887b0de8d217b6cd4a8b476a077429845a5582ba" \ No newline at end of file diff --git a/recipes/alpine/matchbox.pkr.hcl b/recipes/alpine/matchbox.pkr.hcl index 4a8ff01..500a698 100644 --- a/recipes/alpine/matchbox.pkr.hcl +++ b/recipes/alpine/matchbox.pkr.hcl @@ -77,7 +77,7 @@ EOF post-processor "shell-local" { inline = [ "/bin/sh ${path.cwd}/post-processors/sparsify.sh ${var.output_dir}/${var.version}/provisionned/matchbox ${var.image_version}", - "ruby ${local.dirs.tools}/one-templates -t image -m 640 -T ${local.dirs.templates}/one/image/common.tpl -n ${local.output_name}-${var.version}-matchbox -c 'matchbox base image' --image-file ${var.output_dir}/${var.version}/provisionned/matchbox/${local.output_name}-${var.version}-matchbox.img", + "ruby ${local.dirs.tools}/one-templates -t image -m 640 -T ${local.dirs.templates}/one/image/common.tpl -n ${local.output_name}-${var.version}-matchbox -c 'Matchbox base image' --image-file ${var.output_dir}/${var.version}/provisionned/matchbox/${local.output_name}-${var.version}-matchbox.img", "ruby ${local.dirs.tools}/one-templates -t vm -m 640 -T ${local.dirs.templates}/one/vm/matchbox.xml -n ${local.output_name}-${var.version}-matchbox --image-name ${local.output_name}-${var.version}-matchbox" ] } diff --git a/recipes/alpine/provisionning/alpine-3.16-install.sh b/recipes/alpine/provisionning/alpine-3.16-install.sh index 116b0e3..d2a0bd2 100644 --- a/recipes/alpine/provisionning/alpine-3.16-install.sh +++ b/recipes/alpine/provisionning/alpine-3.16-install.sh @@ -2,7 +2,7 @@ set -xeo pipefail # Run the installer -echo "y" | setup-alpine -e -f install.conf +yes | setup-alpine -e -f install.conf # Copy ssh keys echo "Copy packer ssh key" @@ -11,5 +11,8 @@ cp -rp .ssh /mnt/root/ sync umount /mnt +apk update +apk add curl + echo "Rebooting the host after install" reboot diff --git a/recipes/alpine/provisionning/alpine-3.17-install.sh b/recipes/alpine/provisionning/alpine-3.17-install.sh new file mode 120000 index 0000000..2d4ac84 --- /dev/null +++ b/recipes/alpine/provisionning/alpine-3.17-install.sh @@ -0,0 +1 @@ +alpine-3.16-install.sh \ No newline at end of file diff --git a/recipes/alpine/provisionning/alpine-3.17-postinstall.sh b/recipes/alpine/provisionning/alpine-3.17-postinstall.sh new file mode 120000 index 0000000..db37049 --- /dev/null +++ b/recipes/alpine/provisionning/alpine-3.17-postinstall.sh @@ -0,0 +1 @@ +alpine-3.16-postinstall.sh \ No newline at end of file diff --git a/recipes/alpine/provisionning/matchbox.sh b/recipes/alpine/provisionning/matchbox.sh index 357f763..8db2bb3 100644 --- a/recipes/alpine/provisionning/matchbox.sh +++ b/recipes/alpine/provisionning/matchbox.sh @@ -10,6 +10,8 @@ ASSETS_DIR="${MATCHBOX_DIR}/assets/" MATCHBOX_USER="matchbox" FL_VERSIONS="current 3374.2.0" +apk add wget + echo "Downloading matchbox" cd /tmp wget -q --show-progress "${URL}" diff --git a/recipes/alpine/provisionning/templater-install.sh b/recipes/alpine/provisionning/templater-install.sh index 2e83f0a..8c9ca96 100644 --- a/recipes/alpine/provisionning/templater-install.sh +++ b/recipes/alpine/provisionning/templater-install.sh @@ -15,6 +15,8 @@ installTool() { chmod +x ${TOOL_DIR}/${NAME} } +apk add curl + # Install templater installTool "tpr" "https://forge.cadoles.com/attachments/bbe5e07f-433c-4f57-ba88-4f86e2780ca7"