blob: 0189a0216f70a2fc5ff47737f3cd419f8fb0491c [file] [log] [blame]
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -08001{
2 "variables": {
3 "aws_access_key": null,
4 "aws_security_key": null,
5 "security_group_id": null,
6 "source_ami_filter_name": null,
7 "source_ami_filter_owner": null,
8 "subnet_id": null,
9 "ssh_user": null,
10 "distro": null,
11 "cloud_user_data": null
12 },
13 "builders": [
14 {
15 "access_key": "{{user `aws_access_key`}}",
16 "ami_name": "{{user `distro`}} - basebuild - {{isotime \"20060102-1504\"}}",
17 "instance_type": "t2.micro",
18 "region": "us-west-2",
19 "secret_key": "{{user `aws_security_key`}}",
20 "security_group_id": "{{user `security_group_id`}}",
21 "source_ami_filter": {
22 "filters": {
23 "name": "{{user `source_ami_filter_name`}}",
24 "root-device-type": "ebs",
25 "virtualization-type": "hvm"
26 },
27 "most_recent": true,
28 "owners": ["{{user `source_ami_filter_owner`}}"]
29 },
30 "ssh_username": "{{user `ssh_user`}}",
31 "subnet_id": "{{user `subnet_id`}}",
32 "type": "amazon-ebs",
33 "user_data_file": "{{user `cloud_user_data`}}"
34 }
35 ],
36 "provisioners": [
37 {
38 "type": "shell",
39 "scripts": [
40 "provision/baseline.sh",
41 "provision/basebuild.sh",
42 "provision/system_reseal_local_env.sh",
43 "provision/system_reseal.sh"
44 ],
45 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
46 }
47 ]
48}