-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathazure-ubuntu.json
49 lines (42 loc) · 1.49 KB
/
azure-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
{
"variables": {
"location": "uksouth",
"resource_group_name": "packertest-rg",
"image_name": "ArUbuntu1604Image",
"vm_size": "Standard_DS2_v2",
"tenant_id": "{{env `ARM_TENANT_ID`}}",
"subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
"client_id": "{{env `ARM_CLIENT_ID`}}",
"client_secret": "{{env `ARM_CLIENT_SECRET`}}"
},
"builders": [{
"type": "azure-arm",
"tenant_id": "{{user `tenant_id`}}",
"subscription_id": "{{user `subscription_id`}}",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"managed_image_resource_group_name": "{{user `resource_group_name`}}",
"managed_image_name": "{{user `image_name`}}",
"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04-LTS",
"azure_tags": {
"environment": "dev",
"engineer": "Adam Rush"
},
"location": "{{user `location`}}",
"vm_size": "{{user `vm_size`}}"
}],
"provisioners": [{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"apt-get update",
"apt-get upgrade -y",
"apt-get -y install nginx",
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
}]
}