-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.json
66 lines (65 loc) · 2.58 KB
/
config.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
{
"variables": {
"iso_url": "https://mirror.arizona.edu/archlinux/iso/{{ isotime \"2006.01\" }}.01/archlinux-{{ isotime \"2006.01\" }}.01-x86_64.iso",
"iso_checksum_url": "https://mirror.arizona.edu/archlinux/iso/{{ isotime \"2006.01\" }}.01/sha1sums.txt",
"iso_checksum_type": "sha1",
"ssh_timeout": "20m",
"headless": "true",
"output_directory": "./build",
"vm_name": "archlinux-{{ isotime \"2006.01\" }}.01",
"default_user": "admin",
"default_user_public_key": "ssh.pub",
"default_user_public_key_url": "http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{ user `default_user_public_key` }}"
},
"builders": [
{
"type": "qemu",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum_url": "{{ user `iso_checksum_url` }}",
"iso_checksum_type": "{{ user `iso_checksum_type` }}",
"http_directory": "srv",
"boot_wait": "5s",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10>",
"/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/setup-ssh.sh<enter><wait5>",
"/usr/bin/bash ./setup-ssh.sh {{ user `default_user` }} {{ user `default_user_public_key_url` }}<enter>"
],
"disk_size": "8G",
"ssh_username": "{{ user `default_user` }}",
"ssh_agent_auth": true,
"ssh_timeout": "{{ user `ssh_timeout` }}",
"shutdown_command": "sudo shutdown -h now",
"headless": "{{ user `headless` }}",
"output_directory": "{{ user `output_directory` }}",
"vm_name": "{{ user `vm_name` }}"
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "./provision/bootstrap.yml",
"user": "{{ user `default_user` }}",
"extra_arguments": [
"--extra-vars",
"arch_bootstrap_default_user={{ user `default_user` }}",
"--extra-vars",
"arch_bootstrap_default_user_public_key=../srv/{{ user `default_user_public_key` }}",
"--extra-vars",
"arch_bootstrap_reboot_enabled=no"
]
},
{
"type": "shell",
"inline": [
"/usr/bin/sudo /sbin/shutdown -r 0"
],
"expect_disconnect": true
},
{
"type": "ansible",
"playbook_file": "./provision/install.yml",
"user": "{{ user `default_user` }}",
"pause_before": "10s"
}
]
}