This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.json
66 lines (66 loc) · 1.78 KB
/
packer.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
{
"description": "Build Every Election golden image",
"variables": {
"build_region": "eu-west-2",
"branch": "master",
"max_spot_price": "0.1",
"ssh_private_key_file": null,
"app_name": "every_election"
},
"builders": [
{
"name": "server",
"type": "amazon-ebs",
"ssh_keypair_name": "eu-london-provisioning",
"ssh_private_key_file": "{{user `ssh_private_key_file` }}",
"ami_name": "ee {{isotime |clean_ami_name }}",
"associate_public_ip_address": true,
"iam_instance_profile": "ee-packer-ami-builder",
"instance_type":"m4.large",
"region":"{{user `build_region` }}",
"source_ami": "{{user `ubuntu_ami_id` }}",
"spot_price": "{{user `max_spot_price` }}",
"ssh_username": "ubuntu",
"tags": {
"application": "{{user `app_name` }}",
"build_date":"{{isotime}}"
},
"run_tags": {
"application": "{{user `app_name` }}",
"Name": "packer-ami-build",
"Env": "packer-ami-build"
},
"run_volume_tags": {
"application": "{{user `app_name` }}",
"build_date":"{{isotime}}"
},
"snapshot_tags": {
"application": "{{user `app_name` }}",
"build_date":"{{isotime}}"
},
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"delete_on_termination": true,
"volume_size": "20"
}
]
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "./provision.yml",
"groups":["production", "servers", "remote"],
"extra_arguments": [
"--extra-vars", "packer=1"
]
},
{
"type": "shell",
"inline": [
"sudo rm -rf /var/log/cloud-init*.log /home/ubuntu/.ssh/authorized_keys"
]
}
]
}