-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure.json
50 lines (46 loc) · 1.47 KB
/
azure.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
{
"variables": {
"azure_client_id": "{{env `AZURE_CLIENT_ID`}}",
"azure_client_secret": "{{env `AZURE_SECRET`}}",
"azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}",
"azure_tenant_id": "{{env `AZURE_TENANT`}}"
},
"builders": [{
"type": "azure-arm",
"client_id": "{{user `azure_client_id`}}",
"client_secret": "{{user `azure_client_secret`}}",
"subscription_id": "{{user `azure_subscription_id`}}",
"tenant_id": "{{user `azure_tenant_id`}}",
"managed_image_name": "myUbuntuImage",
"managed_image_resource_group_name": "myResourceGroup",
"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "18.04-LTS",
"location": "West Europe",
"vm_size": "Standard_DS2_v2"
}],
"provisioners": [{
"type": "shell-local",
"command": "ansible-galaxy install -r requirements.yml -p roles"
},
{
"type": "ansible",
"playbook_file": "./playbook.yml",
"extra_arguments": [ "--extra-vars", "ansible_python_interpreter=/usr/bin/python3" ]
},
{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"sudo -i",
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
},
{
"type": "shell-local",
"command": "rm -rf roles *-version.txt"
}
]
}