Only use the first found java version if there are multiple installed

This commit is contained in:
Michael Russell 2018-09-05 09:05:09 +02:00
parent a95a48f02d
commit 19717553e5
No known key found for this signature in database
GPG key ID: A90C1696496085FE

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