Add vagrantfile, inventory, ansible.cfg
authorLorin Hochstein <lorin.hochstein@sendgrid.com>
Wed, 4 Feb 2015 03:49:10 +0000 (22:49 -0500)
committerLorin Hochstein <lorin.hochstein@sendgrid.com>
Wed, 4 Feb 2015 03:49:10 +0000 (22:49 -0500)
ch03/Vagrantfile [new file with mode: 0644]
ch03/ansible.cfg [new file with mode: 0644]
ch03/inventory [new file with mode: 0644]

diff --git a/ch03/Vagrantfile b/ch03/Vagrantfile
new file mode 100644 (file)
index 0000000..6e73aa9
--- /dev/null
@@ -0,0 +1,22 @@
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+  # Use the same key for each machine
+  config.ssh.insert_key = false
+
+  config.vm.define "vagrant1" do |vagrant1|
+    vagrant1.vm.box = "ubuntu/trusty64"
+    vagrant1.vm.network "forwarded_port", guest: 80, host: 8080
+    vagrant1.vm.network "forwarded_port", guest: 443, host: 8443
+  end
+  config.vm.define "vagrant2" do |vagrant2|
+    vagrant2.vm.box = "ubuntu/trusty64"
+    vagrant2.vm.network "forwarded_port", guest: 80, host: 8081
+    vagrant2.vm.network "forwarded_port", guest: 443, host: 8444
+  end
+  config.vm.define "vagrant3" do |vagrant3|
+    vagrant3.vm.box = "ubuntu/trusty64"
+    vagrant3.vm.network "forwarded_port", guest: 80, host: 8082
+    vagrant3.vm.network "forwarded_port", guest: 443, host: 8445
+  end
+end
diff --git a/ch03/ansible.cfg b/ch03/ansible.cfg
new file mode 100644 (file)
index 0000000..021335f
--- /dev/null
@@ -0,0 +1,5 @@
+[defaults]
+hostfile = inventory
+remote_user = vagrant
+private_key_file = ~/.vagrant.d/insecure_private_key
+host_key_checking = False
diff --git a/ch03/inventory b/ch03/inventory
new file mode 100644 (file)
index 0000000..e437217
--- /dev/null
@@ -0,0 +1,3 @@
+vagrant1 ansible_ssh_host=127.0.0.1 ansible_ssh_port=2222
+vagrant2 ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200
+vagrant3 ansible_ssh_host=127.0.0.1 ansible_ssh_port=2201