On Tuesday, 22 January 2019 16:05:06 CET ruben melvin wrote:
> Hi guys,
> 
> I am trying to execute below ansible playbook.
> 
> ---
> - name: "checking the java version"
>   hosts: host
>   remote_user: myremoteuser
>   gather_facts: False
>   become: yes
>   become_user: serveruser
>   become_method: 'sudo'
> 
>   tasks:
>     - name: which java
>       shell: which java
>       args:
>         executable: /usr/java/
>       register: java

Here you are trying to run the directory /usr/java/
just remove the args and executable and it should work.


-- 
Kai Stian Olstad


-- 
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/1841498.HknzaHPgJv%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to