Added building Ubuntu 20.04 template

This commit is contained in:
2024-09-22 20:13:32 +03:00
parent 36aa9106ea
commit 09aa511791
35 changed files with 629 additions and 123 deletions

View File

@ -32,7 +32,7 @@ source "vsphere-iso" "ubuntu-24-04-x64" {
host = var.vcenter_host
datastore = var.vcenter_datastore
folder = var.vcenter_folder
# convert_to_template = true
convert_to_template = true
// ****************
vm_name = var.vm_name
CPUs = var.vm_num_cpu
@ -85,10 +85,10 @@ build {
]
}
// provisioner "shell-local" {
// inline = [
// "ansible-playbook ~/ansible/playbooks/os-linux-prep-default.yml -l packer-templ -e hosts_target=packer-templ -e ansible_host=${build.Host} -e connection_username=${var.connection_username} -e connection_ssh_private_key_file=${var.connection_ssh_private_key_file}"
// ]
// }
provisioner "shell-local" {
inline = [
"ansible-playbook ~/ansible/playbooks/os-linux-prep-templ.yml -l packer-templ-ubuntu-24-04-x64 -e hosts_target=packer-templ-ubuntu-24-04-x64 -e ansible_host=${build.Host} -e connection_username=${var.connection_username} -e connection_ssh_private_key_file=${var.connection_ssh_private_key_file}"
]
}
}