-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision-ami.json
executable file
·72 lines (72 loc) · 1.74 KB
/
provision-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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"variables":{
"region":"us-east-1",
"ami_name":"",
"branch":""
},
"builders":[
{
"ami_name":"{{user `ami_name`}}",
"instance_type":"r4.xlarge",
"region":"us-east-1",
"source_ami_filter":{
"filters":{
"virtualization-type":"hvm",
"name":"ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
"root-device-type":"ebs"
},
"owners":[
"099720109477"
],
"most_recent":true
},
"ssh_username":"ubuntu",
"type":"amazon-ebs",
"launch_block_device_mappings":[
{
"device_name":"/dev/sda1",
"delete_on_termination":false,
"volume_size":400,
"volume_type":"gp2"
}
],
"ami_block_device_mappings":[
{
"device_name":"/dev/sda1",
"delete_on_termination":false,
"volume_type":"gp2"
}
]
}
],
"provisioners":[
{
"type": "file",
"source": "./ec2-defaults.cfg",
"destination": "/tmp/defaults.cfg"
},
{
"type": "shell",
"inline": [
"sudo mv /tmp/defaults.cfg /etc/cloud/cloud.cfg.d/defaults.cfg"
]
},
{
"type":"shell",
"script":"runtime-scripts/puppet-install.sh"
},
{
"type":"puppet-masterless",
"manifest_file":"manifests/install/",
"module_paths":["modules/"]
},
{
"type":"shell",
"script":"runtime-scripts/build.sh"
},
{
"type":"shell",
"script":"runtime-scripts/test.sh"
}
]
}