-
Notifications
You must be signed in to change notification settings - Fork 9
/
aws_windows.json
47 lines (47 loc) · 1.22 KB
/
aws_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
{
"_comment": "access key and secret key are drawn from env variables.",
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{ user `aws_access_key` }}",
"secret_key": "{{ user `aws_secret_key` }}",
"region": "us-east-1",
"instance_type": "m3.medium",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "*WindowsServer2012R2*",
"root-device-type": "ebs"
},
"most_recent": true,
"owners": "amazon"
},
"ami_name": "packer-demo-{{timestamp}}",
"user_data_file": "./boot_config/packer_bootstrap_win.txt",
"communicator": "winrm",
"winrm_username": "Administrator",
"winrm_password": "SuperS3cr3t!"
}],
"provisioners": [
{
"type": "powershell",
"environment_vars": ["DEVOPS_LIFE_IMPROVER=PACKER"],
"inline": [
"Write-Output(\"HELLO NEW USER;)",
"Write-Output(\"WELCOME TO $Env:DEVOPS_LIFE_IMPROVER\")"
]
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"script": "./scripts/sample_script.ps1",
"environment_vars": [
"VAR1=A`$Dollar",
"VAR2=A``Backtick",
"VAR3=A`'SingleQuote"
]
}
]
}