Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 1 | { |
| 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 Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 11 | "cloud_user_data": null, |
| 12 | "arch": "x86_64" |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 13 | }, |
| 14 | "builders": [ |
| 15 | { |
| 16 | "access_key": "{{user `aws_access_key`}}", |
Zack Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 17 | "ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 18 | "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 Williams | 36d6629 | 2019-03-09 08:14:02 -0700 | [diff] [blame] | 25 | "architecture": "{{user `arch`}}", |
Linux Foundation Administrators | 1dc9dd5 | 2018-01-26 09:09:09 -0800 | [diff] [blame] | 26 | "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 | } |