aboutsummaryrefslogtreecommitdiffstats
path: root/roles/java/tasks/main.yml
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-22 11:42:56 +0100
committerbinary <me@rgoncalves.se>2021-01-22 11:42:56 +0100
commitf7c9094ff72da79b70d98c4be15636a2d503a2aa (patch)
treecca3127859999eb65e5aa50a50bc8e3d6e597371 /roles/java/tasks/main.yml
parentab009b7d91ece98db3bfb1ab2bc4bf39e3b84c66 (diff)
downloadinfrastructure-f7c9094ff72da79b70d98c4be15636a2d503a2aa.tar.gz
Break java installation in separate role
Diffstat (limited to 'roles/java/tasks/main.yml')
-rw-r--r--roles/java/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
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"
remember that computers suck.