forked from ajxb/packer-linuxmint
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcore_template.json
More file actions
94 lines (93 loc) · 2.8 KB
/
core_template.json
File metadata and controls
94 lines (93 loc) · 2.8 KB
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
91
92
93
94
{
"builders": [
{
"vm_name": "{{user `vm_name`}}",
"cpus": "2",
"memory": "4096",
"type": "virtualbox-iso",
"guest_os_type": "Ubuntu22_LTS_64",
"http_directory": "http",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_wait_timeout": "10000s",
"headless": "{{ user `headless` }}",
"boot_command": [
"{{ user `boot_command_prefix` }}",
"/casper/vmlinuz ",
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `preseed` }} ",
"boot=casper ",
"initrd=/casper/initrd.lz ",
"debug-ubiquity ",
"automatic-ubiquity ",
"noprompt ",
"-- <enter>"
],
"gfx_controller": "vmsvga",
"gfx_vram_size": "32",
"shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
"post_shutdown_delay": "30s",
"disk_size": "{{ user `disk_size` }}",
"guest_additions_mode": "disable",
"hard_drive_interface": "sata",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"]
]
}
],
"post-processors": [
[
{
"compression_level": "9",
"keep_input_artifact": false,
"output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box",
"type": "vagrant",
"vagrantfile_template": "{{ user `vagrantfile_template` }}"
}
]
],
"provisioners": [
{
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": ["script/rc_local.sh", "script/apt.sh", "script/sshd.sh"],
"type": "shell"
},
{
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"expect_disconnect": true,
"scripts": ["script/update.sh", "script/reboot.sh"],
"type": "shell"
},
{
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"pause_before": "60s",
"scripts": [
"script/vagrant.sh",
"script/motd.sh",
"script/cleanup.sh"
],
"type": "shell"
}
],
"variables": {
"cloud_token": "{{env `VAGRANT_CLOUD_TOKEN`}}",
"headless": "false",
"hostname": "vagrant",
"ssh_fullname": "vagrant",
"ssh_password": "vagrant",
"ssh_username": "vagrant",
"_comment": "Variables below should be overridden in template",
"boot_command_prefix": "TBD",
"box_tag": "TBD",
"disk_size": "TBD",
"iso_checksum_type": "TBD",
"iso_checksum": "TBD",
"iso_url": "TBD",
"preseed": "TBD",
"vagrantfile_template": "TBD",
"version": "TBD",
"version_description": "TBD",
"vm_name": "TBD"
}
}