diff --git a/.drone.yml b/.drone.yml index d392aba..0894a12 100644 --- a/.drone.yml +++ b/.drone.yml @@ -29,8 +29,8 @@ steps: curl \ make - | - jq '.password="'"$VSPHERE_PASSWORD"'"' ./packer/ova/vsphere.json > /tmp/vsphere.json && \ - mv /tmp/vsphere.json ./packer/ova/vsphere.json + jq '.password="'"$VSPHERE_PASSWORD"'"' /drone/src/override.json > /tmp/json && \ + mv /tmp/json /drone/src/override.json - | make deps-ova - | @@ -38,6 +38,8 @@ steps: environment: VSPHERE_PASSWORD: from_secret: vsphere_password + PACKER_VAR_FILES: + /drone/src/override.json volumes: - name: output path: /output diff --git a/override.json b/override.json new file mode 100644 index 0000000..69cd91a --- /dev/null +++ b/override.json @@ -0,0 +1,7 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz --- autoinstall quietinitrd /casper/initrdboot", + "cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}", + "cd_files": ["{{user `cd_file_path`}}/meta-data", "{{user `cd_file_path`}}/user-data"], + "cd_label": "cidata", + "floppy_dirs": null +} diff --git a/packer/ova/packer-node.json b/packer/ova/packer-node.json index 9f9b38f..36363ac 100644 --- a/packer/ova/packer-node.json +++ b/packer/ova/packer-node.json @@ -188,8 +188,6 @@ ], "boot_wait": "{{user `boot_wait`}}", "cluster": "{{user `cluster`}}", - "cd_files": ["{{user `cd_file_path`}}/meta-data", "{{user `cd_file_path`}}/user-data"], - "cd_label": "cidata", "communicator": "ssh", "convert_to_template": "{{user `convert_to_template`}}", "cpu_cores": "{{user `cpu_cores`}}", diff --git a/packer/ova/ubuntu-2204.json b/packer/ova/ubuntu-2204.json index 93a9452..64609a7 100644 --- a/packer/ova/ubuntu-2204.json +++ b/packer/ova/ubuntu-2204.json @@ -1,12 +1,12 @@ { - "boot_command_prefix": "clinux /casper/vmlinuz --- autoinstall quietinitrd /casper/initrdboot", + "boot_command_prefix": "clinux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04/'initrd /casper/initrdboot", "boot_disable_ipv6": "0", "boot_media_path": "/media/HTTP", "build_name": "ubuntu-2204", - "cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}", "distro_arch": "amd64", "distro_name": "ubuntu", "distro_version": "22.04", + "floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/", "guest_os_type": "ubuntu-64", "iso_checksum": "10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb", "iso_checksum_type": "sha256",