-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathawsdemoami.json
More file actions
39 lines (39 loc) · 1.14 KB
/
Copy pathawsdemoami.json
File metadata and controls
39 lines (39 loc) · 1.14 KB
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
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [
{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"source_ami": "ami-00068cd7555f543d5",
"instance_type": "t2.micro",
"ssh_username": "{{user `ssh_username`}}",
"temporary_key_pair_type": "ed25519",
"ami_name": "mavericklinux",
"tags":{
"Name": "maverick - {{timestamp}}"
}
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"sudo yum update -y",
"sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2",
"sudo yum install -y httpd mariadb-server",
"sudo systemctl start httpd",
"sudo systemctl enable httpd",
"sudo usermod -a -G apache ec2-user",
"sudo chown -R ec2-user:apache /var/www",
"sudo chmod 2775 /var/www && find /var/www -type d -exec sudo chmod 2775 {} \\;",
"find /var/www -type f -exec sudo chmod 0664 {} \\;",
"echo \"<?php phpinfo(); ?>\" > /var/www/html/phpinfo.php"
]
}
]
}