-
Notifications
You must be signed in to change notification settings - Fork 1
/
ghostpack.json
62 lines (62 loc) · 1.55 KB
/
ghostpack.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
{
"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-a73264ce",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "ghostpack-{{timestamp}}",
"ami_description": "Ghost on Ubuntu 12.04, generated with Packer."
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E {{ .Path }}",
"inline": [
"sleep 3",
"mkdir /packer_tmp",
"chown root:root /packer_tmp",
"chmod 777 /packer_tmp",
"apt-get -y update",
"apt-get -y upgrade",
"add-apt-repository -y ppa:rquillo/ansible",
"apt-get -y update",
"apt-get -y install ansible"
]
},
{
"type": "file",
"source": "files/sshd_config",
"destination": "/packer_tmp/sshd_config"
},
{
"type": "file",
"source": "files/authorized_keys",
"destination": "/packer_tmp/authorized_keys"
},
{
"type": "file",
"source": "files/sysctl.conf",
"destination": "/packer_tmp/sysctl.conf"
},
{
"type": "ansible-local",
"playbook_file": "playbook/ghost.yml",
"role_paths": [
"playbook/roles/base",
"playbook/roles/ghost",
"playbook/roles/mysql",
"playbook/roles/user",
"playbook/roles/nginx"
]
}
]
}