-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebian12.pkr.hcl
81 lines (75 loc) · 2.61 KB
/
debian12.pkr.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
source "proxmox-iso" "debian-kickstart" {
boot_command = [
"<esc><wait>",
"install <wait>",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
"debian-installer=fr_FR.UTF-8 <wait>",
"auto <wait>",
"locale=fr_FR.UTF-8 <wait>",
"kbd-chooser/method=fr <wait>",
"keyboard-configuration/xkb-keymap=fr <wait>",
"netcfg/get_ipaddress=${var.tpl_address} <wait>",
"netcfg/get_netmask=${var.tpl_netmask} <wait>",
"netcfg/get_gateway=${var.tpl_gtw} <wait>",
"netcfg/get_nameservers=${var.tpl_dns} <wait>",
"netcfg/disable_autoconfig=true <wait>",
"netcfg/get_hostname=template <wait>",
"netcfg/get_domain=${var.tpl_domain} <wait>",
"fb=false <wait>",
"debconf/frontend=noninteractive <wait>",
"console-setup/ask_detect=false <wait>",
"console-keymaps-at/keymap=fr <wait>",
"grub-installer/bootdev=/dev/sda <wait>",
"<enter><wait>"
]
boot_wait = "10s"
disks {
disk_size = "20G"
storage_pool = "data2"
type = "scsi"
storage_pool_type = "lvm"
format = "raw"
}
disks {
disk_size = "50G"
storage_pool = "data2"
type = "scsi"
storage_pool_type = "lvm"
format = "raw"
}
http_directory = "http_dir"
insecure_skip_tls_verify = true
iso_file = "local:iso/debian-12.0.0-amd64-netinst.iso"
network_adapters {
bridge = "vmbr0"
model = "virtio"
firewall = false
}
node = "prox"
password = "${var.password}"
username = "${var.username}"
proxmox_url = "${var.urlprox}"
ssh_password = "${var.sshpass}"
ssh_username = "${var.sshuser}"
ssh_timeout = "15m"
vm_name = "debian12"
sockets = 1
cores = 2
memory = 4096
pool = "VM"
template_description = "Debian 12 generated on ${timestamp()}"
template_name = "debian12"
unmount_iso = true
cloud_init = true
cloud_init_storage_pool = "data2"
}
build {
sources = ["source.proxmox-iso.debian-kickstart"]
provisioner "ansible" {
playbook_file = "./playbooks/template.yml"
extra_arguments = ["--vault-password-file=passvault.txt", "--extra-vars", "ansible_ssh_pass=${var.sshpass}", "--extra-vars", "ansible_become_pass=${var.sshpass}"]
keep_inventory_file = true
use_proxy = false
ansible_env_vars = ["ANSIBLE_HOST_KEY_CHECKING=False"]
}
}