I am new to ansible and need suggestion as I how to perform different task 
in different hosts.

I need to setup jdk & wls in one host and move the binaries(jdk/wls) from 
same server to other servers.
I was able to setup on one server(01) but want to move to other 
hosts(02/03) instead of setting up.What is the ideal approach to do without 
copying to temporary location & iterate on other servers.

===========
   playbook
===========
---
- name: Check for fmw path exists
  stat: path=/a/b
  register: check_fmw_path
- name: fmw folder exists
  debug: msg=' Folder already exists'
  when: check_fmw_path.stat.exists
- name: Missing directory

  file: path=/a/b state=directory owner=test group=testgrp mode=755
  when: check_fmw_path.stat.exists == false
- name: Check for jdk path exists
  stat: path=/c/d
  register: check_jdk_path
- name: jdk folder exists
  debug: msg='jdk Folder already exists'
  when: check_jdk_path.stat.exists
- name: Missing jdk directory

  file: path=/c/d state=directory owner=test group=testgrp mode=755
  when: check_jdk_path.stat.exists == false
- name: Copying the jdk binaries
  copy: src=/temp/jdk-7u60-linux-x64.tar.gz dest=/c/d owner=test 
group=testgrp mode=755
- name: Extracting jdk binaries
  command: chdir=/c/d /bin/tar zxvf jdk-7u60-linux-x64.tar.gz
- name: Setting up Weblogic binaries using silent mode
  shell: /temp/wls_binaries.sh
==

Please suggest

-Vinay

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d64aeb63-9511-4341-b76b-965fc505177d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to