-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch.json
115 lines (115 loc) · 3.5 KB
/
arch.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"variables": {
"time_zone": "Europe",
"time_subzone": "Amsterdam",
"username": "user",
"password": "pass"
},
"builders": [
{
"type": "qemu",
"qemuargs": [
["-serial", "none"],
["-parallel", "none"],
["-nodefaults"],
["-nodefconfig"],
["-no-user-config"],
["-enable-kvm"],
["-name", "Packer"],
["-cpu", "host,kvm=off"],
["-smp", "sockets=1,cores=2,threads=1"],
["-m", "2048M"],
["-mem-prealloc"],
["-machine", "pc,accel=kvm,kernel_irqchip=on,mem-merge=off"],
["-net", "nic,model=virtio"],
["-net", "bridge,br=bridge0"],
["-drive", "if=pflash,format=raw,file=output/arch.bin"],
["-drive", "if=virtio,id=drive0,file=temp/arch.raw,format=raw,cache=none,aio=native"],
["-vga", "qxl"],
["-display", "sdl"]
],
"iso_url": "images/archlinux-x86_64.iso",
"iso_checksum": "aeed1a62fe2d812715a121ca93866995",
"iso_checksum_type": "md5",
"output_directory": "temp",
"disk_size": 33800,
"disk_interface": "virtio",
"format": "raw",
"headless": false,
"accelerator": "kvm",
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_username": "root",
"ssh_password": "s0m3password",
"ssh_port": 22,
"ssh_wait_timeout": "30s",
"vm_name": "arch.raw",
"net_device": "virtio-net",
"boot_wait": "3s",
"boot_command": [
"<enter><wait16s>",
"passwd<enter>s0m3password<enter>s0m3password<enter><wait>",
"systemctl start sshd<enter><wait>"
],
"shutdown_timeout": "30s",
"shutdown_command": "shutdown -P now"
},
{
"type": "virtualbox-iso",
"guest_os_type": "ArchLinux_64",
"iso_url": "images/archlinux-x86_64.iso",
"iso_checksum": "8164667750c46cf297720b21145e1e27",
"iso_checksum_type": "md5",
"cpus": 2,
"disk_size": 120000,
"ssh_host_port_min": 2222,
"ssh_host_port_max": 2229,
"ssh_port": 22,
"ssh_username": "root",
"ssh_password": "s0m3password",
"vm_name": "ArchLinux",
"vboxmanage": [
["modifyvm", "{{.Name}}", "--nic1", "nat"],
["modifyvm", "{{.Name}}", "--cableconnected1", "on"],
["modifyvm", "{{.Name}}", "--rtcuseutc", "on"]
],
"boot_wait": "3s",
"boot_command": [
"<enter><wait25s>",
"passwd<enter>s0m3password<enter>s0m3password<enter><wait>",
"systemctl start sshd<enter><wait>"
],
"shutdown_timeout": "120s",
"shutdown_command": "shutdown -P now"
}
],
"provisioners": [
{
"type": "shell",
"scripts": ["resources/scripts/format.sh", "resources/scripts/base.sh"]
},
{
"type": "ansible-local",
"playbook_file": "resources/ansible/base.yaml",
"inventory_file": "resources/ansible/inventory.ini",
"extra_arguments": [
"--extra-vars 'time_zone={{user `time_zone`}} time_subzone={{user `time_subzone`}} username={{user `username`}} password={{user `password`}}'"
]
},
{
"type": "file",
"source": "resources/config/boot/uefi-loader.conf",
"destination": "/mnt/boot/loader/loader.conf"
},
{
"type": "file",
"source": "resources/config/boot/uefi-entry.conf",
"destination": "/mnt/boot/loader/entries/arch.conf"
},
{
"type": "file",
"source": "resources/config/pacman/pacman.conf",
"destination": "/mnt/etc/pacman.conf"
}
]
}