-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin2016-packer.json
36 lines (36 loc) · 1.08 KB
/
win2016-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
{
"variables": {
"source_ami": "{{env `AMI`}}",
"ami_users": "{{env `ACCOUNT`}}",
"snapshot_users": "{{env `ACCOUNT`}}"
},
"builders": [{
"type": "amazon-ebs",
"region": "us-east-1",
"source_ami": "{{user `source_ami`}}",
"instance_type": "m3.medium",
"user_data_file" : "./ec2-userdata.ps1",
"iam_instance_profile": "Packer-IAM-Instance-Role",
"ami_users": "{{user `ami_users`}}",
"snapshot_users": "{{user `snapshot_users`}}",
"ami_name": "Microsoft-Windows-Server-2016-Base-{{isotime \"2006-01-02\"}}",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_use_ssl": true,
"winrm_insecure": true,
"ami_regions": ["us-east-1", "us-east-2"]
}],
"provisioners": [
{
"type": "powershell",
"script": "Set-LaunchConfig.ps1"
},
{
"type": "powershell",
"inline": [
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown"
]
}
]
}