Last active
August 29, 2015 14:23
-
-
Save suz-lab/4f7d5cf3db2f217bb1c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"Region": "", | |
"VpcId": "", | |
"SubnetId": "", | |
"Name": "", | |
"Epoch": "", | |
"SourceAmi": "" | |
}, | |
"builders": [ { | |
"type": "amazon-ebs", | |
"region": "{{user `Region`}}", | |
"source_ami": "{{user `SourceAmi`}}", | |
"instance_type": "t2.micro", | |
"ssh_username": "ec2-user", | |
"vpc_id": "{{user `VpcId`}}", | |
"subnet_id": "{{user `SubnetId`}}", | |
"associate_public_ip_address": "true", | |
"enhanced_networking": "true", | |
"ami_name": "{{user `Name`}}_{{user `Epoch`}}" | |
} ], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline": [ | |
"sudo yum -y update", | |
"sudo pip install ansible", | |
"sudo mkdir /etc/ansible", | |
"sudo touch /etc/ansible/hosts", | |
"rm -f /home/ec2-user/.ssh/authorized_keys" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment