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 d37c8eca51..e432d54975 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\jdk8\bin' + path: 'C:\openjdk\jdk-8\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\jdk8" MKLINK /D "C:\openjdk\jdk8" "%a" + 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" args: executable: cmd.exe - creates: 'C:\openjdk\jdk8' + creates: 'C:\openjdk\jdk-8' tags: Java8 - name: Set JAVA_HOME to version 8 win_path: name: JAVA_HOME - elements: C:\openjdk\jdk8 + elements: C:\openjdk\jdk-8 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\jdk8\bin + elements: C:\openjdk\jdk-8\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 3fde488e36..6786ce4313 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