Created
October 8, 2013 10:28
-
-
Save skiold/6882711 to your computer and use it in GitHub Desktop.
Vagrantfile for vagrant-aws using ami that depends on a ec2-user (fix requiretty in sudo)
This file contains 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
Vagrant.configure("2") do |config| | |
config.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 = "your keypair id" | |
end | |
end |
This file contains 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
Vagrant.configure("2") do |config| | |
config.vm.box = "dummyec2" | |
config.vm.provider :aws do |aws, override| | |
aws.ami = "ami-3c034f6e" | |
aws.region = "ap-southeast-1" | |
aws.user_data = "#!/bin/bash\necho 'Defaults:ec2-user !requiretty' > /etc/sudoers.d/999-vagrant-cloud-init-requiretty && chmod 440 /etc/sudoers.d/999-vagrant-cloud-init-requiretty" | |
override.ssh.username = "ec2-user" | |
override.ssh.private_key_path = "/home/adrians/.ssh/id_rsa_nfs" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first one is to share aws auth credentials between projects.
Place something like that in your ~/.vagrant.d/Vagrantfile