-
Notifications
You must be signed in to change notification settings - Fork 7
/
example.json
36 lines (36 loc) · 995 Bytes
/
example.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": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"region": "us-east-1",
"ssh_username": "ec2-user",
"base_ami": "ami-0e6d2e8684d4ccb3e",
"instance_type": "t2.micro"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key` }}",
"region": "{{user `region` }}",
"source_ami": "{{user `base_ami`}}",
"instance_type": "{{user `instance_type` }}",
"ssh_username": "{{user `ssh_username`}}",
"ami_name": "packer-base-{{timestamp}}",
"associate_public_ip_address": true
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"echo ENABLE NGINX",
"sudo amazon-linux-extras enable nginx1.12",
"echo INSTALL NGINX",
"sudo yum -y install nginx",
"echo START NGINX",
"sudo systemctl enable nginx"
]
}
]
}