-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathubuntu-ami.json
46 lines (46 loc) · 1.29 KB
/
ubuntu-ami.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
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_region": "ap-southeast-2",
"aws_accountId": "099720109477"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "ubuntu-aws-base-{{timestamp}}",
"instance_type": "t2.micro",
"region": "{{user `aws_region`}}",
"secret_key": "{{user `aws_secret_key`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["{{user `aws_accountId`}}"],
"most_recent": true
},
"ssh_username": "ubuntu",
"type": "amazon-ebs"
}
],
"provisioners": [
{
"type": "file",
"source": "./scripts/ubuntu/welcome.txt",
"destination": "/home/ubuntu/"
},
{
"type": "shell",
"inline":[
"ls -al /home/ubuntu",
"cat /home/ubuntu/welcome.txt"
]
},
{
"type": "shell",
"script": "./scripts/ubuntu/bootstrap.sh"
}
]
}