Add precise instance, whoami.yml
authorLorin Hochstein <lorin.hochstein@sendgrid.com>
Sun, 11 Jan 2015 21:12:38 +0000 (16:12 -0500)
committerLorin Hochstein <lorin.hochstein@sendgrid.com>
Sun, 11 Jan 2015 21:12:38 +0000 (16:12 -0500)
ch04/Vagrantfile
ch04/inventory
ch04/whoami.yml [new file with mode: 0644]

index 8eecf6f..eb18fd3 100644 (file)
@@ -14,4 +14,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     centos.vm.box = "chef/centos-6.5"
     centos.vm.network "private_network", ip: "192.168.4.11"
   end
+
+  config.vm.define "precise" do |precise|
+    precise.vm.box = "precise64"
+    precise.vm.network "private_network", ip: "192.168.4.12"
+  end
 end
index 85f8d46..cd5b1d5 100644 (file)
@@ -1,3 +1,8 @@
 [vagrant]
 server1 ansible_ssh_host=192.168.4.10 ansible_ssh_user=vagrant
 server2 ansible_ssh_host=192.168.4.11 ansible_ssh_user=vagrant
+server3 ansible_ssh_host=192.168.4.12 ansible_ssh_user=vagrant
+
+[ubuntu]
+server1
+server3
diff --git a/ch04/whoami.yml b/ch04/whoami.yml
new file mode 100644 (file)
index 0000000..a624570
--- /dev/null
@@ -0,0 +1,9 @@
+---
+- name: show return value of command module
+  hosts: server1
+  gather_facts: False
+  tasks:
+    - name: capture output of id command
+      command: id -un
+      register: login
+    - debug: var=login