-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker-final.json
59 lines (56 loc) · 1.48 KB
/
packer-final.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
{
"variables": {
"name": "",
"region": "us-east-1",
"type": "{{env `TYPE`}}"
},
"sensitive-variables": ["type"],
"builders": [
{
"type": "amazon-ebs",
"region": "{{user `region`}}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-bionic-18.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "{{user `name`}} {{user `type`}} {{timestamp}}",
"ami_description": "from {{.SourceAMI}}",
"tags": {
"OS_Version": "Ubuntu",
"Release": "Latest",
"Base_AMI_Name": "{{ .SourceAMIName }}",
"Extra": "{{ .SourceAMITags.TagName }}"
}
}
],
"provisioners": [
{
"type": "ansible",
"playbook_file": "./playbook.yml",
"user": "ubuntu",
"extra_arguments": [
"--extra-vars",
"ansible_python_interpreter=/usr/bin/python3"
],
"ansible_env_vars": [
"ANSIBLE_HOST_KEY_CHECKING=False"
]
}
],
"post-processors": [
{
"type": "compress",
"output": "archive.zip"
},
{
"type": "manifest"
}
]
}