From 475cf364157fd512138a797ddfc973ca441067e5 Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Thu, 11 Jul 2024 21:52:47 -0400 Subject: [PATCH 1/3] Introducing vm_key_file variable for SSH --- images/macos/templates/macOS-12.anka.pkr.hcl | 7 ++++++- images/macos/templates/macOS-13.anka.pkr.hcl | 7 ++++++- images/macos/templates/macOS-13.arm64.anka.pkr.hcl | 7 ++++++- images/macos/templates/macOS-14.anka.pkr.hcl | 7 ++++++- images/macos/templates/macOS-14.arm64.anka.pkr.hcl | 7 ++++++- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/images/macos/templates/macOS-12.anka.pkr.hcl b/images/macos/templates/macOS-12.anka.pkr.hcl index 20094685..8c0b77bc 100644 --- a/images/macos/templates/macOS-12.anka.pkr.hcl +++ b/images/macos/templates/macOS-12.anka.pkr.hcl @@ -53,6 +53,11 @@ variable "vm_password" { sensitive = true } +variable "vm_key_file" { + type = string + default = "" +} + variable "github_api_pat" { type = string default = "" @@ -96,7 +101,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_password}" + ssh_private_key_file = "${var.vm_key_file}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-13.anka.pkr.hcl b/images/macos/templates/macOS-13.anka.pkr.hcl index 5a358df1..fc02bcdd 100644 --- a/images/macos/templates/macOS-13.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.anka.pkr.hcl @@ -53,6 +53,11 @@ variable "vm_password" { sensitive = true } +variable "vm_key_file" { + type = string + default = "" +} + variable "github_api_pat" { type = string default = "" @@ -96,7 +101,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_password}" + ssh_private_key_file = "${var.vm_key_file}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl index 7f91b8c1..c59aa823 100644 --- a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl @@ -53,6 +53,11 @@ variable "vm_password" { sensitive = true } +variable "vm_key_file" { + type = string + default = "" +} + variable "github_api_pat" { type = string default = "" @@ -97,7 +102,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_password}" + ssh_private_key_file = "${var.vm_key_file}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-14.anka.pkr.hcl b/images/macos/templates/macOS-14.anka.pkr.hcl index a772f726..657ecd90 100644 --- a/images/macos/templates/macOS-14.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.anka.pkr.hcl @@ -53,6 +53,11 @@ variable "vm_password" { sensitive = true } +variable "vm_key_file" { + type = string + default = "" +} + variable "github_api_pat" { type = string default = "" @@ -96,7 +101,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_password}" + ssh_private_key_file = "${var.vm_key_file}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index 65e4edbb..cd2a70e7 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -53,6 +53,11 @@ variable "vm_password" { sensitive = true } +variable "vm_key_file" { + type = string + default = "" +} + variable "github_api_pat" { type = string default = "" @@ -97,7 +102,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_password}" + ssh_private_key_file = "${var.vm_key_file}" ssh_proxy_host = "${var.socks_proxy}" } From 0dbf1cb8a7118b3b090ce8e35629ff3f132f1c0a Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Fri, 12 Jul 2024 16:53:31 -0400 Subject: [PATCH 2/3] Switch to the password auth --- images/macos/templates/macOS-12.anka.pkr.hcl | 7 +------ images/macos/templates/macOS-13.anka.pkr.hcl | 7 +------ images/macos/templates/macOS-13.arm64.anka.pkr.hcl | 7 +------ images/macos/templates/macOS-14.anka.pkr.hcl | 7 +------ images/macos/templates/macOS-14.arm64.anka.pkr.hcl | 7 +------ 5 files changed, 5 insertions(+), 30 deletions(-) diff --git a/images/macos/templates/macOS-12.anka.pkr.hcl b/images/macos/templates/macOS-12.anka.pkr.hcl index 8c0b77bc..eb1fff11 100644 --- a/images/macos/templates/macOS-12.anka.pkr.hcl +++ b/images/macos/templates/macOS-12.anka.pkr.hcl @@ -53,11 +53,6 @@ variable "vm_password" { sensitive = true } -variable "vm_key_file" { - type = string - default = "" -} - variable "github_api_pat" { type = string default = "" @@ -101,7 +96,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_key_file}" + ssh_password = "${var.vm_password}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-13.anka.pkr.hcl b/images/macos/templates/macOS-13.anka.pkr.hcl index fc02bcdd..7d003d3e 100644 --- a/images/macos/templates/macOS-13.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.anka.pkr.hcl @@ -53,11 +53,6 @@ variable "vm_password" { sensitive = true } -variable "vm_key_file" { - type = string - default = "" -} - variable "github_api_pat" { type = string default = "" @@ -101,7 +96,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_key_file}" + ssh_password = "${var.vm_password}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl index c59aa823..abfd0996 100644 --- a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl @@ -53,11 +53,6 @@ variable "vm_password" { sensitive = true } -variable "vm_key_file" { - type = string - default = "" -} - variable "github_api_pat" { type = string default = "" @@ -102,7 +97,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_key_file}" + ssh_password = "${var.vm_password}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-14.anka.pkr.hcl b/images/macos/templates/macOS-14.anka.pkr.hcl index 657ecd90..1dc26603 100644 --- a/images/macos/templates/macOS-14.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.anka.pkr.hcl @@ -53,11 +53,6 @@ variable "vm_password" { sensitive = true } -variable "vm_key_file" { - type = string - default = "" -} - variable "github_api_pat" { type = string default = "" @@ -101,7 +96,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_key_file}" + ssh_password = "${var.vm_password}" ssh_proxy_host = "${var.socks_proxy}" } diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index cd2a70e7..54414268 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -48,11 +48,6 @@ variable "vm_username" { sensitive = true } -variable "vm_password" { - type = string - sensitive = true -} - variable "vm_key_file" { type = string default = "" @@ -102,7 +97,7 @@ source "null" "template" { ssh_host = "${var.source_vm_name}" ssh_port = "${var.source_vm_port}" ssh_username = "${var.vm_username}" - ssh_private_key_file = "${var.vm_key_file}" + ssh_password = "${var.vm_password}" ssh_proxy_host = "${var.socks_proxy}" } From 284ffaacd7b10350a2de0232a2ed75dfa287e54f Mon Sep 17 00:00:00 2001 From: Pavel Iakovenko Date: Fri, 12 Jul 2024 16:55:10 -0400 Subject: [PATCH 3/3] Deleted wrong code --- images/macos/templates/macOS-14.arm64.anka.pkr.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index 54414268..547c5670 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -48,9 +48,9 @@ variable "vm_username" { sensitive = true } -variable "vm_key_file" { +variable "vm_password" { type = string - default = "" + sensitive = true } variable "github_api_pat" {