From: Lorin Hochstein Date: Sun, 11 Jan 2015 21:12:38 +0000 (-0500) Subject: Add precise instance, whoami.yml X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=8638870975848c7942bfe7e62cbf2bd61769a418;p=ansiblebook.git Add precise instance, whoami.yml --- diff --git a/ch04/Vagrantfile b/ch04/Vagrantfile index 8eecf6f..eb18fd3 100644 --- a/ch04/Vagrantfile +++ b/ch04/Vagrantfile @@ -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 diff --git a/ch04/inventory b/ch04/inventory index 85f8d46..cd5b1d5 100644 --- a/ch04/inventory +++ b/ch04/inventory @@ -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 index 0000000..a624570 --- /dev/null +++ b/ch04/whoami.yml @@ -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