forked from oerazo/packer-windows-ami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision-windows.json
51 lines (49 loc) · 1.42 KB
/
provision-windows.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
{
"variables": {
"base_ami_id": ""
},
"builders": [
{
"type": "amazon-ebs",
"region": "ap-southeast-2",
"source_ami": "{{user `base_ami_id`}}",
"instance_type": "t2.micro",
"communicator": "winrm",
"winrm_username": "Administrator",
"ami_name": "WindowsAMI-{{isotime \"2006-01-02\"}}",
"user_data_file": "template/setup_winrm.txt",
"ami_block_device_mappings": [ {
"device_name": "/dev/sda1",
"volume_type": "gp2",
"volume_size": 64,
"delete_on_termination": true
} ],
"launch_block_device_mappings": [ {
"device_name": "/dev/sda1",
"volume_type": "gp2",
"volume_size": 64,
"delete_on_termination": true
} ]
}
],
"provisioners" : [
{
"type": "file",
"source": "template/install_programs.ps1",
"destination": "C:\\Users\\Administrator\\install_programs.ps1"
},
{
"type": "file",
"source": "template/softwareToInstall.json",
"destination": "C:\\Users\\Administrator\\softwareToInstall.json"
},
{
"type": "powershell",
"inline": ["Powershell -NonInteractive -File \"C:\\Users\\Administrator\\install_programs.ps1\" -json \"C:\\Users\\Administrator\\softwareToInstall.json\""]
},
{
"type": "windows-shell",
"inline": ["tzutil /s \"AUS Eastern Standard Time\""]
}
]
}