Skip to content

Instantly share code, notes, and snippets.

@xiii
Created April 29, 2014 23:37
Show Gist options
  • Save xiii/a399eb7ad82965544f40 to your computer and use it in GitHub Desktop.
Save xiii/a399eb7ad82965544f40 to your computer and use it in GitHub Desktop.
Sample Vagrantfile version 2 for AWS
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.pty = true
config.vm.box_url = 'https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box'
config.vm.define "puppetmaster" do |zzz|
zzz.vm.box = "dummy"
zzz.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY']
aws.secret_access_key = ENV['AWS_SECRET_KEY']
aws.keypair_name = "xxx"
aws.ami = "ami-xxx"
aws.instance_type = "t1.micro"
aws.region = "eu-west-1"
aws.subnet_id = "subnet-xxx"
aws.security_groups = ["sg-xxx"]
aws.private_ip_address = "1.2.3.4"
aws.tags = {
'Name' => 'puppetmaster'
}
override.ssh.username = "xxx"
override.ssh.private_key_path = "xxx.pem"
end
config.vm.provision :shell, :inline => 'provision_puppetmaster.sh'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment