From 8e31c2434b3d3ff1e16365f01af64acbf45bf696 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Fri, 11 Oct 2024 16:59:30 +0100 Subject: [PATCH] Use hyphenated path when looking for unzipped binary --- .../roles/adoptopenjdk_install/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml index eecbe213c6..1e3606fdd7 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/adoptopenjdk_install/tasks/main.yml @@ -136,7 +136,7 @@ - not usr_lib_jvm_exists.stat.exists tags: adoptopenjdk_install -- name: Check if jdk-{{ jdk_version }} is already installed in the target location +- name: Check if jdk{{ jdk_version }} is already installed in the target location shell: ls -ld {{ path }} >/dev/null 2>&1 failed_when: false register: adoptopenjdk_installed @@ -356,7 +356,7 @@ until: adoptopenjdk_unpack is not failed - name: Get {{ path }}* full path name - shell: set -o pipefail | ls -ld {{ path }}* 2>/dev/null | awk '{print $9}' + shell: set -o pipefail | ls -ld /usr/lib/jvm/jdk-{{ jdk_version }}* 2>/dev/null | awk '{print $9}' register: adoptopenjdk_dir changed_when: false when: