blob: 92f5090053d0de282ae8f4914929c8f9793bdb2e [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,
Zack Williams36d66292019-03-09 08:14:02 -070011 "cloud_user_data": null,
12 "arch": "x86_64"
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080013 },
14 "builders": [
15 {
16 "access_key": "{{user `aws_access_key`}}",
Zack Williams36d66292019-03-09 08:14:02 -070017 "ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080018 "instance_type": "t2.micro",
19 "region": "us-west-2",
20 "secret_key": "{{user `aws_security_key`}}",
21 "security_group_id": "{{user `security_group_id`}}",
22 "source_ami_filter": {
23 "filters": {
24 "name": "{{user `source_ami_filter_name`}}",
Zack Williams36d66292019-03-09 08:14:02 -070025 "architecture": "{{user `arch`}}",
Linux Foundation Administrators1dc9dd52018-01-26 09:09:09 -080026 "root-device-type": "ebs",
27 "virtualization-type": "hvm"
28 },
29 "most_recent": true,
30 "owners": ["{{user `source_ami_filter_owner`}}"]
31 },
32 "ssh_username": "{{user `ssh_user`}}",
33 "subnet_id": "{{user `subnet_id`}}",
34 "type": "amazon-ebs",
35 "user_data_file": "{{user `cloud_user_data`}}"
36 }
37 ],
38 "provisioners": [
39 {
40 "type": "shell",
41 "scripts": [
42 "provision/baseline.sh",
43 "provision/basebuild.sh",
44 "provision/system_reseal_local_env.sh",
45 "provision/system_reseal.sh"
46 ],
47 "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
48 }
49 ]
50}