-
Notifications
You must be signed in to change notification settings - Fork 0
/
packer.json.dev
57 lines (57 loc) · 1.47 KB
/
packer.json.dev
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
{
"variables": {
"changes": "{{ env `CHANGES` }}",
"gitinfo": "{{ env `GITINFO` }}",
"branch": "{{ env `BRANCH` }}"
},
"builders": [
{
"type": "amazon-ebs",
"name": "empire-us-east-1",
"access_key": "",
"secret_key": "",
"region": "us-east-1",
"source_ami": "ami-c135f3aa",
"instance_type": "m3.medium",
"ssh_username": "ubuntu",
"ssh_timeout": "5m",
"ami_name": "DEV IMAGE Empire PaaS {{user `branch` | clean_ami_name}} {{isotime | clean_ami_name}}",
"tags": {
"changes": "{{user `changes`}}",
"gitinfo": "{{user `gitinfo`}}"
},
"ami_users": [
"427009882155",
"415355184500",
"990501462471",
"066251891493",
"559544594286"
]
}
],
"provisioners": [
{
"type": "file",
"source": "files",
"destination": "/tmp/packer_files"
},
{
"type": "file",
"source": "ansible",
"destination": "/tmp/ansible"
},
{
"type": "shell",
"pause_before": "60s",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo {{ .Path }}",
"script": "files/setup.sh"
},
{
"type": "ansible-local",
"command": "chmod +x /tmp/packer-provisioner-ansible-local/hosts; EMPIRE_HOSTGROUP=empire_ami sudo -E ansible-playbook --tags build_ami ",
"playbook_file": "./ansible/site.yml",
"inventory_file": "files/hosts",
"playbook_dir": "./ansible"
}
]
}