Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit 7743984

Browse files
committed
Fix for #37 JAVA_HOME now set on Ubuntu
1 parent e813f1c commit 7743984

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tasks/linux.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,19 @@
138138
dest: /root/test_java.yml
139139
mode: 0644
140140

141-
- name: Fix JAVA_HOME
141+
- name: Set JAVA_HOME in /etc/profile.d/java.sh
142142
template:
143143
src: java.sh
144144
dest: /etc/profile.d/java.sh
145145
mode: 0644
146146

147+
- name: Set JAVA_HOME in /etc/environment
148+
blockinfile:
149+
path: /etc/environment
150+
state: present
151+
block: |
152+
JAVA_HOME={{ java8_home }}
153+
JRE_HOME={{ java8_home }}/jre
154+
JDK_HOME={{ java8_home }}
155+
marker: '# base_java'
147156
...

0 commit comments

Comments
 (0)