The repo contains the basic components you need for building and provisioning a customized AMI using Packer tool from Hashicorp: we are using an amazon-ebs builder, and a simple shell provisioner responsible for issuing the Ansible playbook that is going to do all the stuff.
Follow the instructions from Hashicorp for installing Packer
Define your access and secret keys for accessing your AWS account:
ubuntu@devops-box$ export AWS_ACCESS_KEY_ID=<your-access-key>
ubuntu@devops-box$ export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
Invoke packer for building your image:
ubuntu@devops-box$ packer build ami-melapela.json