new file
This commit is contained in:
70
data/QuickAndDirty/almalinux.pkr.hcl
Normal file
70
data/QuickAndDirty/almalinux.pkr.hcl
Normal file
@@ -0,0 +1,70 @@
|
||||
packer {
|
||||
}
|
||||
|
||||
variable "ISODISK" {
|
||||
type = string
|
||||
default = "ISOS:iso/AlmaLinux-9-latest-x86_64-minimal.iso"
|
||||
}
|
||||
|
||||
source "proxmox" "alma" {
|
||||
template_name = "alma"
|
||||
template_description = "Alma Linux 9 Server template"
|
||||
proxmox_url = "https://192.168.111.34:8006/api2/json"
|
||||
node = "grosnoeud"
|
||||
iso_file = var.ISODISK
|
||||
iso_checksum = "63ae680790f71d56ddc5f050d5bcd1caf34824241f0861876f75194f75a3894f"
|
||||
insecure_skip_tls_verify = true
|
||||
pool = "Linux-VM"
|
||||
vm_name = "PackerTest"
|
||||
vm_id = 664
|
||||
memory = 2048
|
||||
cores = 1
|
||||
sockets = 2
|
||||
os = "l26"
|
||||
http_port_min = 4990
|
||||
http_port_max = 4999
|
||||
http_directory = "redhat"
|
||||
username = "root@pam"
|
||||
password = "bzzYpm8koNtPKFYjpjXSyjFY"
|
||||
ssh_username = "root"
|
||||
ssh_password = "M0ukreneIsVeryGood!"
|
||||
ssh_timeout = "15m"
|
||||
#username = "packer_build@pam"
|
||||
#password = "tvowyfv9gh23sdfAERtLWav2674"
|
||||
#ssh_username = "packer_build"
|
||||
#ssh_password = "tvowyfv9gh23sdfAERtLWav2674"
|
||||
network_adapters {
|
||||
model = "virtio"
|
||||
bridge = "vmbr111"
|
||||
}
|
||||
|
||||
qemu_agent = true
|
||||
scsi_controller = "virtio-scsi-pci"
|
||||
|
||||
disks {
|
||||
type = "scsi"
|
||||
disk_size = "55G"
|
||||
storage_pool = "FAST"
|
||||
storage_pool_type = "lvm-thin"
|
||||
format = "raw"
|
||||
}
|
||||
boot_wait = "5s"
|
||||
boot_command = ["<wait2><up><wait1><tab><wait1> inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/redhat.kix<wait1s><enter>"]
|
||||
}
|
||||
|
||||
build {
|
||||
sources = [ "source.proxmox.rocky" ]
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user