Skip to content

Instantly share code, notes, and snippets.

@mystelynx
Created June 9, 2014 21:01
Show Gist options
  • Save mystelynx/828d5a6bb3e81fa5d718 to your computer and use it in GitHub Desktop.
Save mystelynx/828d5a6bb3e81fa5d718 to your computer and use it in GitHub Desktop.
config.vm.define 'ec2' do |ec2|
ec2.vm.provider :aws do |aws, override|
aws.access_key_id = 'xxx'
aws.secret_access_key = 'yyy'
aws.keypair_name = 'zzz'
aws.region = 'ap-northeast-1'
aws.subnet_id = 'subnet-xxxxxxx'
aws.private_ip_address = '172.31.15.251'
aws.ssh_host_attribute = :private_ip_address
aws.security_groups = ['sg-xxxxxxx']
aws.ami = 'www'
aws.instance_type = 't1.micro'
aws.tags = {
'Name' => 'test',
}
override.ssh.username = 'user'
override.ssh.private_key_path = './xxx.id_rsa'
end
ec2.vm.provision :ansible do |ansible|
ansible.playbook = 'main.yml'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment