Skip to content

Instantly share code, notes, and snippets.

@justinhohner
Created May 6, 2018 16:09
Show Gist options
  • Save justinhohner/7437bfc9c5db47c2b97a3419242ba59f to your computer and use it in GitHub Desktop.
Save justinhohner/7437bfc9c5db47c2b97a3419242ba59f to your computer and use it in GitHub Desktop.
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"iam_instance_profile": "api-stage"
},
"provisioners": [
{
"type": "ansible",
"playbook_file": "ansible/site.yml",
"groups": "apiservers",
"inventory_directory": "ansible/",
"extra_arguments": [
"--extra-vars",
"{ansible_python_interpreter: '/usr/bin/env python3'}"
]
}
],
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "us-east-1",
"subnet_id": "subnet-c3c805a7",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
"root-device-type": "ebs"
},
"owners": ["099720109477"],
"most_recent": true
},
"instance_type": "t2.micro",
"ssh_username": "ubuntu",
"ami_name": "api-stage {{timestamp}}"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment