-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathubuntu.json
90 lines (90 loc) · 2.35 KB
/
ubuntu.json
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
82
83
84
85
86
87
88
89
90
{
"variables": {
"proxmox_username": "root@pam",
"proxmox_password": "{{env `PROXMOX_PASSWORD`}}",
"proxmox_url": "https://{{env `PROXMOX_HOST`}}:8006/api2/json",
"ssh_username": "root",
"ssh_password": "{{env `ROOT_SSH_PASSWORD`}}",
"iso": "ubuntu-18.04.3-server-amd64.iso",
"httpIP": "{{env `HTTPIP`}}"
},
"builders": [
{
"type": "proxmox",
"proxmox_url": "{{user `proxmox_url`}}",
"insecure_skip_tls_verify": true,
"username": "{{user `proxmox_username`}}",
"password": "{{user `proxmox_password`}}",
"node": "batcave",
"network_adapters": [
{
"bridge": "vmbr0",
"model": "virtio"
}
],
"disks": [
{
"storage_pool": "zfs",
"storage_pool_type": "zfspool",
"disk_size": "128G"
}
],
"memory": 16384,
"cores": 4,
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_timeout": "30m",
"iso_file": "local:iso/{{user `iso`}}",
"unmount_iso": true,
"http_directory": "http",
"qemu_agent": true,
"template_name": "rke",
"template_description": "rke",
"boot": "order=scsi0;ide2",
"boot_wait": "15s",
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait> ",
"initrd=/install/initrd.gz ",
"auto-install/enable=true ",
"debconf/priority=critical ",
"preseed/url=http://{{user `httpIP`}}:{{.HTTPPort}}/preseed.cfg<wait> ",
" -- <wait>",
"<enter><wait>"
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "env {{ .Vars }} {{ .Path }}",
"script": "scripts/enable-modules.sh"
},
{
"type": "shell",
"execute_command": "env {{ .Vars }} {{ .Path }}",
"script": "scripts/install-software.sh"
},
{
"type": "shell",
"inline": [
"mkdir -p /home/rke/.ssh"
]
},
{
"type": "file",
"source": "keys/rke.pub",
"destination": "/home/rke/.ssh/rke.pub"
},
{
"type": "shell",
"inline": [
"touch /home/rke/.ssh/authorized_keys",
"cat /home/rke/.ssh/rke.pub >> /home/rke/.ssh/authorized_keys",
"chown -R rke /home/rke/.ssh"
]
}
]
}