blob: e19bf616c867fd01606cb91a53a36826e88051cd [file] [log] [blame]
{
"variables": {
"instance_type": "t2.medium",
"aws_access_key": null,
"aws_security_key": null,
"security_group_id": null,
"source_ami_filter_name": null,
"source_ami_filter_owner": null,
"source_ami_filter_product_code": "",
"subnet_id": null,
"ssh_user": null,
"distro": null,
"cloud_user_data": null,
"arch": "x86_64"
},
"builders": [
{
"access_key": "{{user `aws_access_key`}}",
"ami_name": "{{user `distro`}} - basebuild - {{user `arch`}} - {{isotime \"20060102-1504\"}}",
"instance_type": "{{user `instance_type`}}",
"region": "us-west-2",
"secret_key": "{{user `aws_security_key`}}",
"security_group_id": "{{user `security_group_id`}}",
"source_ami_filter": {
"filters": {
"name": "{{user `source_ami_filter_name`}}",
"product-code": "{{user `source_ami_filter_product_code`}}",
"architecture": "{{user `arch`}}",
"root-device-type": "ebs",
"virtualization-type": "hvm"
},
"most_recent": true,
"owners": ["{{user `source_ami_filter_owner`}}"]
},
"ssh_username": "{{user `ssh_user`}}",
"subnet_id": "{{user `subnet_id`}}",
"type": "amazon-ebs",
"user_data_file": "{{user `cloud_user_data`}}"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"provision/baseline.sh",
"provision/basebuild.sh",
"provision/system_reseal_local_env.sh",
"provision/system_reseal.sh"
],
"execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
}
]
}