Files
MyMasters/data/Linux/linux.pkr.hcl
2024-10-26 12:37:21 +02:00

62 lines
1.6 KiB
HCL

source "proxmox-iso" "ubuntu" {
template_name = "ubuntu"
template_description = "Ubuntu Linux Server template"
proxmox_url = "https://192.168.111.36:8006/api2/json"
node = "n100noeud"
boot_iso {
type = "scsi"
iso_file = var.ISODISK
unmount = true
iso_checksum = var.ISOHASH
}
insecure_skip_tls_verify = true
# pool = "Linux-VM"
vm_name = var.vm_name
vm_id = 664
memory = 2048
cores = 1
sockets = 2
os = "l26"
cpu_type = "host"
http_port_min = 4990
http_port_max = 4999
http_directory = "ubuntu"
username = "root@pam"
password = "galeregalere"
ssh_username = "root"
ssh_password = "M0ukreneIsVeryGood!"
ssh_timeout = "15m"
network_adapters {
model = "virtio"
bridge = "vmbr111"
}
qemu_agent = true
scsi_controller = "virtio-scsi-pci"
disks {
type = "scsi"
disk_size = "55G"
storage_pool = "FAST"
format = "qcow2"
}
boot_wait = "5s"
boot_command = var.BOOT_COMMAND
}
build {
sources = [ "source.proxmox-iso.ubuntu" ]
# provisioner "ansible" {
# pause_before = "20s"
# ansible_env_vars= [
# "ANSIBLE_HOST_KEY_CHECKING=False",
# "ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s'",
# "ANSIBLE_NOCOLOR=True"
# ]
# extra_arguments= [
# "-e templating=true"
# ]
# playbook_file = "../../../Ansible/playbooks/MyLinuxServers.yaml"
# }
}