<|start_filename|>contrib/packer/template.json<|end_filename|>
{
  "variables": {
    "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
    "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
    "aws_region": "{{env `AWS_REGION`}}"
  },
  "builders": [{
    "type": "amazon-ebs",
    "access_key": "{{user `aws_access_key`}}",
    "secret_key": "{{user `aws_secret_key`}}",
    "region": "{{user `aws_region`}}",
    "source_ami": "ami-611bb17c",
    "instance_type": "t1.micro",
    "ssh_username": "ubuntu",
    "ami_name": "puppet-aws-{{timestamp}}"
  }],
  "provisioners": [{
    "type": "shell",
    "script": "scripts/puppet.sh"
  }, {
    "type": "file",
    "source": "hieradata",
    "destination": "/tmp"
  }, {
    "type": "puppet-masterless",
    "manifest_file": "manifests/site.pp",
    "hiera_config_path": "hiera.yaml",
    "module_paths": ["modules"]
  }, {
    "type": "file",
    "source": "tests",
    "destination": "/tmp"
  }, {
    "type": "shell",
    "script": "scripts/serverspec.sh"
  }]
}
