forked from BigChiefRick/packer-ubuntu-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu.json
50 lines (48 loc) · 1.51 KB
/
ubuntu.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
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"region" : "us-east-1"
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "{{user `region`}}",
"source_ami": "ami-0817d428a6fb68645",
"vpc_id": "vpc-0fe5523276e3e4ca5",
"subnet_id": "subnet-04092d2c00cdd0ba6",
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"associate_public_ip_address": "true",
"ami_name": "Ubuntu-AIP{{timestamp}}"
}
],
"provisioners": [
{
"type": "file",
"source": "./linux-client-bundle.zip",
"destination": "/tmp/"
},
{
"type": "file",
"source": "NessusAgent-8.2.2-ubuntu1110_amd64.deb",
"destination": "/tmp/"
},
{"type": "shell",
"inline":["sudo apt-get update && sudo apt -y upgrade"]},
{
"type": "shell",
"inline": ["sleep 20"]},
{"type": "shell",
"inline":["sudo apt install -y jq unzip",
"sudo dpkg -i /tmp/NessusAgent-* && sudo /opt/nessus_agent/sbin/nessuscli agent link --host=nmanager.itsec.tamu.edu --port=8834 --key=2c165f682a11309b7bfca1a82e2c0c191025ab068d2af02122b6277ef84bc298 --group=AIP",
"sudo unzip /tmp/linux-client-bundle.zip -d /tmp",
"sudo chmod +x /tmp/install.sh",
"cd /tmp && sudo ./install.sh",
"sudo apt -y upgrade"]},
{"type": "shell",
"script": "falcon-download.sh"}
]
}