Merge pull request #493 from elastic/there_can_be_only_one

Only use the first found java version if there are multiple installed
This commit is contained in:
Michael Russell 2018-09-06 13:47:11 +02:00 committed by GitHub
commit fb760f4b90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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