From f7c9094ff72da79b70d98c4be15636a2d503a2aa Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 22 Jan 2021 11:42:56 +0100 Subject: Break java installation in separate role --- roles/java/tasks/main.yml | 22 ++++++++++++++++++++++ roles/java/vars/main.yml | 8 ++++++++ 2 files changed, 30 insertions(+) create mode 100644 roles/java/tasks/main.yml create mode 100644 roles/java/vars/main.yml (limited to 'roles/java') diff --git a/roles/java/tasks/main.yml b/roles/java/tasks/main.yml new file mode 100644 index 0000000..748314a --- /dev/null +++ b/roles/java/tasks/main.yml @@ -0,0 +1,22 @@ + +# java ~~ roles/java/tasks/main.yml +# install and configure java runtime environment + +--- + +- name: install java for OpenBSD + package: name="{{ java_package_openbsd }}" state=present + when: ansible_distribution == "OpenBSD" + +- name: install java for Alpine + package: name="{{ java_package_alpine }}" state=present + when: ansible_distribution == "Alpine" + +- name: add java to /usr path + file: + src: /usr/local/jdk-11/bin/java + dest: /usr/local/bin/java + state: link + owner: "{{ user_root }}" + group: "{{ group_root }}" + when: ansible_distribution == "OpenBSD" diff --git a/roles/java/vars/main.yml b/roles/java/vars/main.yml new file mode 100644 index 0000000..5db3b4c --- /dev/null +++ b/roles/java/vars/main.yml @@ -0,0 +1,8 @@ + +# grafana ~~ roles/grafana/tasks/main.yml +# grafana variables + +--- + +java_package_openbsd: jdk-11.0.8.10.1v0 +java_package_alpine: openjdk11-jre-headless -- cgit v1.2.3