From 85ded65ae8dcbdcf922a1b43d8b0c0a838c7ad80 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Thu, 26 Sep 2024 08:38:02 +0100 Subject: [PATCH] Set random ssh password for builder For providers that don't have a built-in support for random ssh keys this change makes sure that the default builder password used during the image build process is a randomly generated value. Signed-off-by: Marcus Noble --- images/capi/packer/nutanix/packer.json | 2 +- images/capi/packer/ova/packer-common.json | 2 +- images/capi/packer/proxmox/packer.json | 2 +- images/capi/packer/qemu/packer.json | 2 +- images/capi/packer/raw/packer.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/images/capi/packer/nutanix/packer.json b/images/capi/packer/nutanix/packer.json index 959005df8f..c92c4ec759 100644 --- a/images/capi/packer/nutanix/packer.json +++ b/images/capi/packer/nutanix/packer.json @@ -157,7 +157,7 @@ "scp_extra_vars": "", "source_image_delete": "false", "source_image_force": "false", - "ssh_password": "builder", + "ssh_password": "{{ uuid }}", "ssh_username": "builder", "vm_force_delete": "false" } diff --git a/images/capi/packer/ova/packer-common.json b/images/capi/packer/ova/packer-common.json index bab9c2bde2..402b26e856 100644 --- a/images/capi/packer/ova/packer-common.json +++ b/images/capi/packer/ova/packer-common.json @@ -23,7 +23,7 @@ "remote_type": "", "remote_username": "", "skip_compaction": "false", - "ssh_password": "builder", + "ssh_password": "{{ uuid }}", "ssh_proxy_host": "", "ssh_proxy_port": "", "ssh_timeout": "60m", diff --git a/images/capi/packer/proxmox/packer.json b/images/capi/packer/proxmox/packer.json index 634d19b098..6cc06836e3 100644 --- a/images/capi/packer/proxmox/packer.json +++ b/images/capi/packer/proxmox/packer.json @@ -192,7 +192,7 @@ "node": "{{env `PROXMOX_NODE`}}", "proxmox_url": "{{env `PROXMOX_URL`}}", "sockets": "2", - "ssh_password": "builder", + "ssh_password": "{{ uuid }}", "ssh_username": "builder", "storage_pool": "{{env `PROXMOX_STORAGE_POOL`}}", "storage_pool_type": "lvm", diff --git a/images/capi/packer/qemu/packer.json b/images/capi/packer/qemu/packer.json index e261a2a8a8..ea69dbc284 100644 --- a/images/capi/packer/qemu/packer.json +++ b/images/capi/packer/qemu/packer.json @@ -201,7 +201,7 @@ "output_directory": "./output/{{user `build_name`}}-kube-{{user `kubernetes_semver`}}", "python_path": "", "qemu_binary": "qemu-system-x86_64", - "ssh_password": "builder", + "ssh_password": "{{ uuid }}", "ssh_username": "builder", "vm_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}", "vnc_bind_address": "127.0.0.1" diff --git a/images/capi/packer/raw/packer.json b/images/capi/packer/raw/packer.json index 1d52a5f983..5ddaf8d90a 100644 --- a/images/capi/packer/raw/packer.json +++ b/images/capi/packer/raw/packer.json @@ -177,7 +177,7 @@ "output_directory": "./output/{{user `build_name`}}-kube-{{user `kubernetes_semver`}}", "python_path": "", "qemu_binary": "qemu-system-x86_64", - "ssh_password": "builder", + "ssh_password": "{{ uuid }}", "ssh_username": "builder", "vm_name": "{{user `build_name`}}-kube-{{user `kubernetes_semver`}}" }