-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVagrantfile
55 lines (44 loc) · 1.65 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
ENV['VAGRANT_DEFAULT_PROVIDER'] = "aws"
Vagrant.configure("2") do |config|
config.hostmanager.enabled = false
# Use the dummy box provided by the vagrant-aws plugin
config.vm.box = "aws"
# Force aws to use rsync by default for faster setup
config.vm.allowed_synced_folder_types = [:rsync]
config.vm.define "ansible-controller" do |controller|
controller.vm.box = 'aws'
controller.vm.hostname = 'ansible-controller'
controller.hostmanager.enabled = true
controller.vm.provider 'aws' do |aws, override|
aws.aws_profile = "vagrant"
# Specify SSH keypair to use
aws.keypair_name = 'vagrant_kp'
# Specify region, AMI ID, Instance and security group
aws.ami = 'ami-34332854'
aws.instance_type = 't2.micro'
aws.security_groups = [ 'vagrant' ]
aws.ssh_host_attribute = "public_ip_address"
# Specify username and private key path
override.ssh.username = 'ansible'
override.ssh.private_key_path = '~/.ssh/vagrant_kp.pem'
end
end
config.vm.define "pg" do |pg1|
pg1.vm.box = 'aws'
pg1.vm.hostname = 'pg'
pg1.hostmanager.enabled = true
pg1.vm.provider 'aws' do |aws, override|
aws.aws_profile = "vagrant"
# Specify SSH keypair to use
aws.keypair_name = 'vagrant_kp'
# Specify region, AMI ID, Instance and security group
aws.ami = 'ami-5c3c273c'
aws.instance_type = 't2.micro'
aws.security_groups = [ 'vagrant' ]
aws.ssh_host_attribute = "public_ip_address"
# Specify username and private key path
override.ssh.username = 'ansible'
override.ssh.private_key_path = '~/.ssh/vagrant_kp.pem'
end
end
end