Skip to content

Commit

Permalink
install jdk in user dir on linux (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhan9san authored Oct 10, 2024
1 parent 2ec8036 commit 69cab52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
jdk_version: 17.0.2
install_jdk_in_user_dir_on_linux: false
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

- name: Set destination directory based on OS
ansible.builtin.set_fact:
jdk_dest: "{{ (ansible_facts.system == 'Linux') | ternary('/opt', ansible_facts.user_dir) }}"
jdk_dest: "{{ (ansible_facts.system == 'Linux' and not install_jdk_in_user_dir_on_linux) | ternary('/opt', ansible_facts.user_dir) }}"

- name: Print jdk_dest
ansible.builtin.debug:
Expand Down

0 comments on commit 69cab52

Please sign in to comment.