-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.json
64 lines (64 loc) · 1.9 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"builders": [
{
"name" : "CentOS7",
"type" : "amazon-ebs",
"region" : "us-east-1",
"ami_name": "{{user `ami_name` | clean_ami_name}}",
"tags" : {
"Name": "{{user `ami_name`}}"
},
"run_tags": {
"Name": "{{user `ami_name`}}"
},
"run_volume_tags": {
"Name": "{{user `ami_name`}}"
},
"snapshot_tags": {
"Name": "{{user `ami_name`}}"
},
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name" : "{{user `ami_regex`}}",
"root-device-type" : "ebs"
},
"owners": [
"679593333241"
],
"most_recent": true
},
"associate_public_ip_address" : true,
"communicator" : "ssh",
"ssh_username" : "centos",
"instance_type" : "t2.micro",
"vpc_id" : "{{user `vpc_id`}}",
"subnet_id" : "{{user `subnet_id`}}",
"iam_instance_profile" : "{{user `iam_prof`}}",
"temporary_security_group_source_cidr": "{{user `temp_cidr`}}",
"ami_users" : "{{user `ami_users`}}"
}
],
"provisioners": [
{
"type" : "ansible",
"playbook_file" : "./ansible/playbook.yml",
"user" : "centos",
"ansible_env_vars": [
"ANSIBLE_REMOTE_TEMP='/tmp/.ansible/'",
"ANSIBLE_REMOTE_USER=centos",
"ANSIBLE_CONFIG='./ansible/ansible.cfg'"
]
}
],
"variables": {
"temp_cidr" : "",
"vpc_id" : "{{env `VPC_ID`}}",
"subnet_id" : "{{env `SUBNET_ID`}}",
"iam_prof" : "",
"aws_region": "{{env `AWS_REGION`}}",
"ami_regex" : "CentOS Linux 7 x86_64*",
"ami_name" : "CentOS-7-{{timestamp}}",
"ami_users" : ""
}
}