Skip to content

Commit

Permalink
remove hyphen from windows bootjdk symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroon-Khel committed Oct 11, 2024
1 parent 9076832 commit 8effd97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8effd97

Please sign in to comment.