-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcentos.json
49 lines (49 loc) · 1.35 KB
/
centos.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
48
49
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"iam_instance_profile": "{{env `PACKER_BUILDER_INSTANCE_PROFILE`}}",
"region": "us-east-1"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "packer-centos-{{timestamp}}",
"associate_public_ip_address": true,
"iam_instance_profile": "{{user `iam_instance_profile`}}",
"instance_type": "t2.micro",
"region": "{{user `region`}}",
"secret_key": "{{user `aws_secret_key`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "CIS Centos Linux 7 Benchmark *",
"root-device-type": "ebs"
},
"owners": ["679593333241"],
"most_recent": true
},
"ssh_username": "centos",
"tags": {
"Name": "packer-builder"
},
"type": "amazon-ebs"
}
],
"provisioners": [
{
"type": "file",
"source": "s3fs-bucket.txt",
"destination": "/tmp/s3fs-bucket.txt"
},
{
"type": "file",
"source": "tf-packer.pub",
"destination": "/tmp/tf-packer.pub"
},
{
"type": "shell",
"script": "./remote-setup.sh"
}
]
}