Add role java

This commit is contained in:
flyingscorpio@clevo 2022-02-27 13:54:36 +01:00
parent 1eb3d120f8
commit ea1abadd31
4 changed files with 18 additions and 4 deletions

View file

@ -34,10 +34,6 @@ rust:
- run:
- rustup default stable
java:
- install:
- jdk-openjdk
pacman_hooks:
- run:
- sudo mkdir -p /etc/pacman.d/hooks

View file

@ -18,6 +18,7 @@
- { role: markdown, tags: markdown }
- { role: tor, tags: tor }
- { role: sudoers, tags: sudoers }
- { role: java, tags: java }
- { role: lilypond, tags: lilypond }
- { role: latex, tags: latex }
- { role: protonvpn, tags: protonvpn }

3
roles/java/meta/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
dependencies:
- role: check-sudo

14
roles/java/tasks/main.yml Normal file
View file

@ -0,0 +1,14 @@
---
- name: Install java-openjdk (Archlinux)
become: true
pacman:
name:
- jdk-openjdk
when: ansible_distribution == 'Archlinux'
- name: Install java-openjdk (Debian)
become: true
apt:
name:
- jdk-openjdk
when: ansible_distribution == 'Debian'