diff --git a/almalinux9.pkr.hcl b/almalinux9.pkr.hcl index 6fd8dd1..fdf9190 100644 --- a/almalinux9.pkr.hcl +++ b/almalinux9.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,13 +47,12 @@ variable "ram" { variable "ssh_password" { type = string - default = "testtest - " -} + default = "testtest" + } variable "ssh_username" { type = string - default = "root + default = "root" } variable "version" { diff --git a/centos9.pkr.hcl b/centos9.pkr.hcl index 1d34154..bdb6e75 100644 --- a/centos9.pkr.hcl +++ b/centos9.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,13 +47,12 @@ variable "ram" { variable "ssh_password" { type = string - default = "testtest - " -} + default = "testtest" + } variable "ssh_username" { type = string - default = "root + default = "root" } variable "version" { diff --git a/fedora40.pkr.hcl b/fedora40.pkr.hcl index b5fe6af..81ac833 100644 --- a/fedora40.pkr.hcl +++ b/fedora40.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,13 +47,12 @@ variable "ram" { variable "ssh_password" { type = string - default = "testtest - " -} + default = "testtest" + } variable "ssh_username" { type = string - default = "root + default = "root" } variable "version" { diff --git a/http/almalinux9-kickstart.cfg b/http/almalinux9-kickstart.cfg index e54bd7b..ed04886 100644 --- a/http/almalinux9-kickstart.cfg +++ b/http/almalinux9-kickstart.cfg @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #auth --enableshadow --passalgo=sha512 url --url="https://repo.almalinux.org/almalinux/9.4/isos/x86_64/kickstart/" diff --git a/http/centos9-kickstart.cfg b/http/centos9-kickstart.cfg index 103365f..b8a4f78 100644 --- a/http/centos9-kickstart.cfg +++ b/http/centos9-kickstart.cfg @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #auth --enableshadow --passalgo=sha512 url --url="https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os" diff --git a/http/fedora40-kickstart.cfg b/http/fedora40-kickstart.cfg index dc76f92..b250034 100644 --- a/http/fedora40-kickstart.cfg +++ b/http/fedora40-kickstart.cfg @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #auth --enableshadow --passalgo=sha512 url --url="https://fedora.cu.be/linux/releases/40/Server/x86_64/os/" diff --git a/http/ubuntu2004/user-data b/http/ubuntu2004/user-data index a8c6e97..789243f 100644 --- a/http/ubuntu2004/user-data +++ b/http/ubuntu2004/user-data @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #cloud-config autoinstall: @@ -6,7 +6,7 @@ autoinstall: identity: hostname: ubuntu2004 username: ubuntu - password: $6$rounds=4096$ZtkvjJfiHVU/SuD8$iwkSpAEcMYTIvDIwxBi1oK5Fp6WG0p1PKfHsh1NHCBt4wn6bTBRsU8HbWY54v8T4PQiM4jdj9eUBTxwA5tcmk1 + password: $6$rounds=4096$uv35FUl.TnvkNARV$RtVnAa5T.kJVMDO4Bw6nifGQDNM2Qm35HwL5dxu8/VMKhfCn1NHYtFv6Up.j4Jz9jT.c4iH6IT58NbQxljSeJ1 user-data: disable_root: false keyboard: diff --git a/http/ubuntu2204/user-data b/http/ubuntu2204/user-data index f23e7bc..30431bb 100644 --- a/http/ubuntu2204/user-data +++ b/http/ubuntu2204/user-data @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #cloud-config autoinstall: @@ -6,7 +6,7 @@ autoinstall: identity: hostname: ubuntu2204 username: ubuntu - password: $6$rounds=4096$vSLwDGbi1gbxaBZn$NSq/YeafB0orfM587UFPOWHlYMWW3T/rkpKtGCsq3V03GxwgNKl7J/zzDNr54xXFyynEEOfk0yx23HoJXo7Qv0 + password: $6$rounds=4096$0wptHenX3wOVRwcG$EW5TDnsDHoMuiZTMfsVNGkK.Vvi7YBNnthAwxZ0ipTQDRDXIXK0RjNyEdI/qpp/EIpkGgf5ALm2zHc6.aslcv. user-data: disable_root: false keyboard: diff --git a/http/ubuntu2404/user-data b/http/ubuntu2404/user-data index 82c1b8d..5fa91fb 100644 --- a/http/ubuntu2404/user-data +++ b/http/ubuntu2404/user-data @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z #cloud-config autoinstall: @@ -6,7 +6,7 @@ autoinstall: identity: hostname: ubuntu2404 username: ubuntu - password: $6$rounds=4096$2ExOc1g2ThbWuMJy$/4CUzgN8tNBm.59pebFdyyF4hZoCmVg45CdDpPC0Emp5NE8Y0ePfos8cY/t9Nchxf9/tTUvhPSspwvsGsQ3rn. + password: $6$rounds=4096$zzqe46CqaveQeQiI$1iAFQ70Me6FDKmd9Ztw5tlLfyOAvm.X7P4hOl.XPLmQYejfsxSAgV/g29u/6mfyfhI/RH81yqALCOgHsbYoSv. user-data: disable_root: false keyboard: diff --git a/roles/build-packer-templates/templates/linux.pkr.hcl.j2 b/roles/build-packer-templates/templates/linux.pkr.hcl.j2 index 98288fc..b17a89f 100644 --- a/roles/build-packer-templates/templates/linux.pkr.hcl.j2 +++ b/roles/build-packer-templates/templates/linux.pkr.hcl.j2 @@ -47,15 +47,15 @@ variable "ram" { variable "ssh_password" { type = string - default = "{% if item.type == 'debian' %}{{ item.ssh_password |default(debian.ssh_password) }} - {% elif item.type == 'redhat' %}{{ item.ssh_password |default(redhat.ssh_password) }} - {% endif -%}" + default = {% if item.type == 'debian' %}"{{ item.ssh_password |default(debian.ssh_password) }}" + {% elif item.type == 'redhat' %}"{{ item.ssh_password |default(redhat.ssh_password) }}" + {% endif -%} } variable "ssh_username" { type = string - default = "{% if item.type == 'debian' %}{{ item.ssh_username |default('ubuntu') }}" - {% elif item.type == 'redhat' %}{{ item.ssh_username |default('root') }} + default = {% if item.type == 'debian' %}"{{ item.ssh_username |default('ubuntu') }}" + {% elif item.type == 'redhat' %}"{{ item.ssh_username |default('root') }}" {% endif -%} } diff --git a/ubuntu2004.pkr.hcl b/ubuntu2004.pkr.hcl index b8b7e82..cca64da 100644 --- a/ubuntu2004.pkr.hcl +++ b/ubuntu2004.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,9 +47,8 @@ variable "ram" { variable "ssh_password" { type = string - default = "ubuntu - " -} + default = "ubuntu" + } variable "ssh_username" { type = string diff --git a/ubuntu2204.pkr.hcl b/ubuntu2204.pkr.hcl index 67868a9..ff83a21 100644 --- a/ubuntu2204.pkr.hcl +++ b/ubuntu2204.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,9 +47,8 @@ variable "ram" { variable "ssh_password" { type = string - default = "ubuntu - " -} + default = "ubuntu" + } variable "ssh_username" { type = string diff --git a/ubuntu2404.pkr.hcl b/ubuntu2404.pkr.hcl index d94d8c2..a90d145 100644 --- a/ubuntu2404.pkr.hcl +++ b/ubuntu2404.pkr.hcl @@ -1,4 +1,4 @@ -#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:07:04Z +#Generated by packer-kvm/build-packer-templates.yaml at 2024-10-18T19:11:59Z variable "config_file" { type = string @@ -47,9 +47,8 @@ variable "ram" { variable "ssh_password" { type = string - default = "ubuntu - " -} + default = "ubuntu" + } variable "ssh_username" { type = string