-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpacker-thehive-standalone.json
66 lines (63 loc) · 1.74 KB
/
packer-thehive-standalone.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": "TheHive/Cortex Standalone Image",
"variables": {
"packer_aws_region": "us-east-1",
"packer_root_device_size": "8",
"packer_fs_type": "xfs"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `packer_aws_access_key`}}",
"secret_key": "{{user `packer_aws_secret_key`}}",
"ami_name": "thehive-{{isotime \"2006-01-02-030405\" | clean_ami_name}}",
"ami_description": "TheHive/Cortex (standalone) {{ timestamp }}",
"ami_users": "{{user `packer_aws_ami_users`}}",
"region": "{{ user `packer_aws_region` }}",
"subnet_id": "{{ user `packer_aws_ami_build_subnet` }}",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "{{ user `packer_aws_ami_filter_name` }}",
"root-device-type": "ebs"
},
"owners": ["{{ user `packer_aws_ami_filter_owner` }}"],
"most_recent": true
},
"instance_type": "t2.medium",
"ssh_username": "{{ user `packer_aws_ami_ssh_username` }}"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/01-packages.sh"
]
},
{
"type": "file",
"source": "local_config.json",
"destination": "/tmp/local_config.json"
},
{
"type": "shell",
"inline": [
"/bin/mkdir -p ~/ansible"
]
},
{
"type": "ansible-local",
"galaxy_file": "ansible/requirements.yml",
"playbook_dir": "ansible",
"playbook_file": "ansible/playbook.yml",
"staging_directory": "~/ansible"
},
{
"type": "shell",
"inline": [
"/bin/rm -f /tmp/local_config.json"
]
}
]
}