From 8effd9722d44811d1effb86be2b5c7add4c495a6 Mon Sep 17 00:00:00 2001 From: Haroon Khel Date: Fri, 11 Oct 2024 13:38:14 +0100 Subject: [PATCH] remove hyphen from windows bootjdk symlinks --- .../roles/Java8/tasks/main.yml | 10 +++++----- .../roles/Java_install/tasks/main.yml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java8/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java8/tasks/main.yml index e432d54975..d37c8eca51 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java8/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java8/tasks/main.yml @@ -4,7 +4,7 @@ ########## - name: Test if Java 8 is already installed win_stat: - path: 'C:\openjdk\jdk-8\bin' + path: 'C:\openjdk\jdk8\bin' register: java8_installed tags: Java8 @@ -29,16 +29,16 @@ tags: Java8 - name: Create symlink to directory without spaces if not already there - win_shell: for /D %a in ("C:\Program Files\Java\jdk8*") do IF NOT EXIST "C:\openjdk\jdk-8" MKLINK /D "C:\openjdk\jdk-8" "%a" + win_shell: for /D %a in ("C:\Program Files\Java\jdk8*") do IF NOT EXIST "C:\openjdk\jdk8" MKLINK /D "C:\openjdk\jdk8" "%a" args: executable: cmd.exe - creates: 'C:\openjdk\jdk-8' + creates: 'C:\openjdk\jdk8' tags: Java8 - name: Set JAVA_HOME to version 8 win_path: name: JAVA_HOME - elements: C:\openjdk\jdk-8 + elements: C:\openjdk\jdk8 scope: machine state: present when: (not java8_installed.stat.exists) @@ -47,7 +47,7 @@ - name: Add JAVA_HOME/bin to Path win_path: name: Path - elements: C:\openjdk\jdk-8\bin + elements: C:\openjdk\jdk8\bin scope: machine state: present when: (not java8_installed.stat.exists) diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml index 6786ce4313..3fde488e36 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Java_install/tasks/main.yml @@ -4,7 +4,7 @@ ################ - name: Test if Java is already installed version {{ jdk_version }} win_stat: - path: 'C:\openjdk\jdk-{{ jdk_version }}\bin' + path: 'C:\openjdk\jdk{{ jdk_version }}\bin' register: java_installed tags: Java_install @@ -39,10 +39,10 @@ tags: Java_install - name: Create symlink to directory without spaces if not already there - win_shell: for /D %a in ("C:\Program Files\Java\jdk-{{ jdk_version }}*") do IF NOT EXIST "C:\openjdk\jdk-{{ jdk_version }}" MKLINK /D "C:\openjdk\jdk-{{ jdk_version }}" "%a" + win_shell: for /D %a in ("C:\Program Files\Java\jdk-{{ jdk_version }}*") do IF NOT EXIST "C:\openjdk\jdk{{ jdk_version }}" MKLINK /D "C:\openjdk\jdk{{ jdk_version }}" "%a" args: executable: cmd.exe - creates: 'C:\openjdk\jdk-{{ jdk_version }}' + creates: 'C:\openjdk\jdk{{ jdk_version }}' tags: Java_install - name: Remove temp zip file