-
Notifications
You must be signed in to change notification settings - Fork 0
/
image-packer.json
55 lines (52 loc) · 1.21 KB
/
image-packer.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
{
"variables": {
"do_api_key": "",
"ssh_pass": ""
},
"sensitive-variables": ["do_api_key"],
"builders": [
{
"type": "digitalocean",
"api_token": "{{user `do_api_key`}}",
"image": "ubuntu-22-04-x64",
"region": "nyc1",
"size": "s-1vcpu-1gb",
"ssh_username": "root",
"droplet_name": "ares-{{user `droplet_name`}}-{{timestamp}}",
"snapshot_name": "ares-{{user `droplet_name`}}-{{timestamp}}",
"communicator": "ssh"
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"cloud-init status --wait"
]
},
{
"type": "file",
"source": "files/etc/",
"destination": "/etc/"
},
{
"type": "shell",
"inline": [
"echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections",
"cd /etc/aresmush",
"chmod +x complete_setup.sh",
"chmod +x initial_image.sh",
"chmod +x /etc/update-motd.d/99-aresmush-install",
"sudo ./initial_image.sh",
"rm initial_image.sh"
]
},
{
"type": "shell",
"scripts": [
"scripts/90-cleanup.sh",
"scripts/99-img-check.sh"
]
}
]
}