12345678910111213141516171819202122232425262728293031323334353637383940 |
- {
- "variables": {
- "source_ami" : "{{ env `SOURCE_AMI` }}",
- "region" : "{{ cookiecutter.aws_region }}",
- "aws_access_key" : "{{ env `AWS_ACCESS_KEY_ID` }}",
- "aws_secret_key" : "{{ env `AWS_SECRET_ACCESS_KEY` }}"
- },
- "provisioners": [
- {
- "type" : "shell",
- "inline" : [
- "/bin/echo 'Your patience will be rewarded'",
- "sleep 300",
- "sudo apt-get update",
- "sudo apt-get -y install curl python python-pip"
- ]
- },
- {
- "type" : "ansible",
- "playbook_file" : "./ansible/playbook.yml"
- }
- ],
- "builders": [
- {
- "type" : "amazon-ebs",
- "access_key" : "{{user `aws_access_key`}}",
- "secret_key" : "{{user `aws_secret_key`}}",
- "region" : "{{user `region`}}",
- "source_ami" : "{{user `source_ami`}}",
- "ssh_username" : "ubuntu",
- "instance_type" : "m3.medium",
- "ami_name" : "{{cookiecutter.packer_name}}-{{timestamp}}",
- "tags" : {
- "role" : "{{cookiecutter.packer_name}}",
- "build_date" : "{{timestamp}}"
- }
- }
- ],
- "post-processors": [ ]
- }
|