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, |
| 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 | } |