Skip to content

Instantly share code, notes, and snippets.

@rjosephwright
Created June 26, 2015 21:03
Show Gist options
  • Save rjosephwright/16722edd70ac4ee313da to your computer and use it in GitHub Desktop.
Save rjosephwright/16722edd70ac4ee313da to your computer and use it in GitHub Desktop.
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"source_ami": "ami-xxxxxxxx"
},
"builders": [{
"type": "amazon-ebs",
"region": "us-west-2",
"source_ami": "{{user `source_ami`}}",
"instance_type": "t2.micro",
"ssh_username": "ec2-user",
"ami_name": "jw-packer-{{timestamp}}"
}],
"provisioners": [{
"type": "shell",
"inline": [
"sudo yum install --enablerepo=epel -y ansible"
]
},
{
"type": "ansible-local",
"playbook_file": "ami.yml"
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment