mirror of
https://github.com/schnidrig/openhab-ansible
synced 2026-01-12 00:48:46 +01:00
upgrade to openhab 3
This commit is contained in:
22
roles/openhab/tasks/jdk.yml
Normal file
22
roles/openhab/tasks/jdk.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
- name: create directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
state: directory
|
||||
loop:
|
||||
- "/opt/jdk"
|
||||
|
||||
- name: Get JDK
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ jdk_url }}"
|
||||
dest: "/opt/jdk"
|
||||
remote_src: yes
|
||||
creates: "/opt/jdk/{{ jdk }}"
|
||||
|
||||
- name: Set alternatives
|
||||
shell: "update-alternatives --install /usr/bin/java java /opt/jdk/{{ jdk }}/bin/java 1"
|
||||
- name: Set alternatives
|
||||
shell: "update-alternatives --install /usr/bin/javac javac /opt/jdk/{{ jdk }}/bin/javac 1"
|
||||
Reference in New Issue
Block a user