Re: [ansible-project] Re: getting error while checking which java using ansible

2019-01-28 Thread Karl Auer
Make a list of possible places that a java executable might be, in order of preference, and work through the list checking each location in turn. Or use the shell command I gave you last week to search an entire directory tree for java executables; checking a list of possible candidates will be a

[ansible-project] Re: getting error while checking which java using ansible

2019-01-27 Thread ruben melvin
I am actually not supposed to add or set anything on that server as it is a production server. So setting environment is not an option for me. I just need to know the java version using ansible so that it will help me a lot in reducing the manual works of my teammates. I tried out using the

[ansible-project] Re: getting error while checking which java using ansible

2019-01-24 Thread Sanjay
Either you can set/edit default PATH for java bin in /etc/sudoers (visudo) by editing Defaultssecure_path = /sbin:/bin:/usr/sbin:/usr/bin Or you can set environment while executing ansible-playbook --- - name: "checking the java version" hosts: host remote_user: myremoteuser