Skip to content

Instantly share code, notes, and snippets.

@yukikaoru
Created August 12, 2014 08:06
Show Gist options
  • Save yukikaoru/177d02d6305242e8a175 to your computer and use it in GitHub Desktop.
Save yukikaoru/177d02d6305242e8a175 to your computer and use it in GitHub Desktop.
Template for EC2+Ansible
# vim:set ft=ruby ts=2 sts=2 sw=2:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = ""
aws.secret_access_key = ""
aws.keypair_name = ""
aws.ami = "ami-a1124fa0"
aws.region = "ap-northeast-1"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = ""
end
config.vm.define "host1" do |m|
m.vm.provider :aws do |aws, override|
aws.instance_type = "t2.micro"
aws.security_groups = "default"
end
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "../playbooks/site.yml"
ansible.groups = {
}
ansible.extra_vars = {
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment