-
Notifications
You must be signed in to change notification settings - Fork 0
/
amazon-linux_packer-template.json
39 lines (37 loc) · 1.26 KB
/
amazon-linux_packer-template.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
{
"variables": {
"aws_region": "{{env `AWS_REGION`}}",
"aws_ami_name": "amazon-linux_{{isotime \"02Jan2006\"}}"
},
"builders": [{
"type": "amazon-ebs",
"region": "{{user `aws_region`}}",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "{{user `aws_ami_name`}}",
"ami_description": "Customized Amazon Linux",
"associate_public_ip_address": "true",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "amzn-ami*-ebs",
"root-device-type": "ebs"
},
"owners": ["137112412989", "591542846629", "801119661308", "102837901569", "013907871322", "206029621532", "286198878708", "443319210888"],
"most_recent": true
}
}],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo yum update -y",
"sudo /usr/sbin/update-motd --disable",
"echo 'No unauthorized access permitted' | sudo tee /etc/motd",
"sudo rm /etc/issue",
"sudo ln -s /etc/motd /etc/issue",
"sudo yum install -y elinks screen"
]
}
]
}