Fix java install path when system has multiple java (#753)

This commit fix the command to get Java install path when the system has
multiple java installed

Fix #721
This commit is contained in:
Julien Mailleret 2021-01-06 18:22:27 +01:00 committed by GitHub
parent 470eae90ed
commit e1fd7d770d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'
- name: Get the installed java path - name: Get the installed java path
shell: "update-alternatives --display java | grep '^/' | awk '{print $1}' | grep 1.8.0 | head -1" shell: "update-alternatives --display java | grep '^/' | awk '{print $1}' | grep 1.8.0-openjdk | head -1"
become: yes become: yes
register: java_full_path register: java_full_path
failed_when: False failed_when: False