A very simple java installer wich installs from repos and works under FreeBSD

This commit is contained in:
7u83 2020-07-26 23:36:14 +00:00
parent f73f2635d2
commit d508443a06
2 changed files with 23 additions and 0 deletions

10
java/init.sls Normal file
View File

@ -0,0 +1,10 @@
#
{% from "plnx/java/map.jinja" import java with context %}
Java:
pkg.installed:
- name: {{java.pkg}}

13
java/map.jinja Normal file
View File

@ -0,0 +1,13 @@
#
{% set java = salt['grains.filter_by']({
'Debian': {
'pkg': 'openjdk-11-jdk',
'java_home': '/usr/lib/jvm/java-11-openjdk-amd64'
},
'FreeBSD': {
'java_home': '/usr/local/openjdk11',
'pkg': 'openjdk11'
},
}, default='Debian') %}